Skip Navigation

[Resolved] Filter view by date after importing with WP All Import

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years ago.

Assisted by: Nigel.

Author
Posts
#1149089

Hi!

I'm importing a XML file with a cron job with the WP All Import plugin and the new Toolset addon. I've got an imported date field which I like to use to filter the view. The date field seems okay, but I get a 'no items found' message when I select a date in the datepicker. Is there something I can do to get this working?

Thanks,

Tim

#1149198

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Tim

"The date field seems okay".

What does that mean exactly?

Types date fields are stored as timestamps (hidden link).

If the dates you have imported are stored in any other format then filtering by date won't work.

WP All Import has a feature whereby you can pass the values being imported through a function before they are saved, and if the date fields in your XML file are in a different format, you could use a function to convert them to timestamps first.

You should be able to use strtotime for that: hidden link