Skip Navigation

[Resolved] Acceptable Formats for Custom Date Field (Import failing)

This support ticket is created 4 years, 3 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by davidL-7 4 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1460403

I am trying to: Import data into a Toolset custom field that is a date type.

Link to a page where the issue can be seen: N/A

I expected to see: A date.

Instead, I got: An empty field.

We are using an plugin called WP All Import (hidden link) to pull data from an XML feed (at hidden link) and insert it into a custom post type created by Toolset. The custom post includes custom fields created by Toolset, and our issue that we're unable to get a successful insert into the date field.

The field we're getting the date data from is <Filed_Date> in hidden link.

All of the other fields are fine, but after the import is run, the date field remains empty. I'm thinking that it may be an issue with the format of the date data.

Can you tell me what formats are allowed, or what format the date should be in, to validly insert into a Toolset Date custom field?

Thanks!
David

#1460549

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you for getting in touch.

Our Types date fields are stored as epoch timestamps, so these fields will need to be converted to a timestamp and not the string value of the date.
hidden link

It needs to be a numerical value. Once this is done then it should work fine.

Thanks,
Shane

#1464385

Thanks for the reply Shane. This one's resolved, but I wanted to get you what I found in case it's useful for anyone else.

What I found is that in importing a date from a data source (in this case an XML file) into a Toolset custom field of the date type via the WP All Import, a date format like this -- YYYY-MM-DD will work; MM-DD-YYYY will not work. Not sure why, but I think the issue is actually in the way WP All Import parses the date on it's way to importing into the custom post field.

We just changed the format in the source data to YYYY-MM-DD and the import was successful.

Thanks for the support,
David

#1464387

My issue is resolved now. Thank you!

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