• Resolved Arturrrro

    (@arturrrro)


    Hi!

    First apologies for my english ??

    I would like to import only selected records from a file by filtering data by date field
    <updated_date>2017-03-23T08:03:17.721618+00:00</updated_date>

    How to use XPath to filter after date greater than “2017-03-20” or compare it to system date, eg systdate-7? It is possible?

    P.S.
    The only thing I managed to get is a full comparison and it works
    /art[updated_date[1] = “2017-03-23T08:03:17.721618+00:00”]
    but other operators do not work ??
    /art[updated_date[1] > “2017-03-20T08:03:17.721618+00:00”]

    Thx!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @arturrrro

    Unfortunately, it’s not possible with XPath 1.0 to use a dynamic date for this. However, you can use a static date with this syntax:

    /art[translate(updated_date[1],"-:T+","") > translate("2017-03-20T08:03:17.721618+00:00","-:T+","")]

    Plugin Author WP All Import

    (@wpallimport)

    Marking this as resolved. @arturrrro if you run into issues or have more questions about this, feel free to reply here and let us know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Import using date filtering in Step 2’ is closed to new replies.