Skip Navigation

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

This support ticket is created 5 years, 4 months 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.

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 5 years, 4 months 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

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.