Skip Navigation

[Resolved] import date field from The Events Calendar plugin

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

Our next available supporter will start replying to tickets in about 6.58 hours from now. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by nicolaT-2 6 years, 5 months ago.

Author
Posts
#907321

Hi,
I'm importing content from an old website that uses The Events Calendar plugin to manage events, to a new website where events are a CPT made with Toolset. I have a problem with the event dates that, once imported in Toolset are totally wrong: almost every event becomes dated on "1 january 1970".

The date in Toolset is set in a custom field of "date" type.

To import content I'm using the plugin WP All Import, in the xml file I'm importing the date is in the field:
<wp:meta_value><![CDATA[2018-01-27 20:30:00]]></wp:meta_value>

Is there a way to import the date correctly? Do I have to change something in the xml source?

Thanks,
Nicola

#907385

That won't work.

Toolset expects a valid Timestamp as date value, but your input is a Date formatted differently.
hidden link

You would need to convert your current Date values to a valid timestamp.
This could be done with a script, for example in PHP, using this function:
hidden link

Valid date formats you can use to start with are shown here:
hidden link

In the end, before you populate the Toolset Date field, your date must be of Timestamp format or it won't work.

#907433

Ok, I got it. Thanks Beda.

Nicola