Skip Navigation

[Resolved] date field format not as given / populated

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 2 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#2306039
01-03-2022 20-42-06.jpg

Tell us what you are trying to do?

I have set up a field group with a date field (wpe_item_ends) and a single line text field (wpe_item_ends) for test verification.

Then I populated both with exact same values, given from a RSS importer.
The given format is typically a RFC 822 Format (e.g. Wed, 02 Mar 2022 09:00:00 +0100)

Now:
Within the post custom fields, the date field now contains the timestamp when I populated the post, not the time I did submit. (wrong: 1st March 2022, 19:40)
But in the single line field it shows the correct imported value: Wed, 02 Mar 2022 09:00:00 +0100

What can I do to get a correct date import done in to date fields ? Thanks for your assistance.

Is there any documentation that you are following?
I did not find any docu herefore.

Is there a similar example that we can see?
I have to prepare if needed. See screenshots.

What is the link to your site?
hidden link - but i have not output done yet

#2306269

Hello,

The custom date field of Types plugin stores value in timestamp format, so before you import the date values, you will need to convert the date value from string format into timestamp format, for example:
hidden link

#2310067

Many thanks Luo, that helps to understand how to proceed...
I am using wpematico plugin (similar to RSS Aggregator) and i am parsing RSS content into the custom field.

So as I am not very familiar with hooks or filters, may I ask you for a hint where to or how to to find a correct filter or hook on which I can modifiy these custom field values at the moment before inserting them to the "wpcf-" field ?
?
thanks a lot, marcus

#2310913

It depends on the "wpematico" plugin you mentioned above, you can check it with "wpematico" plugin author, check if there is any filter hook where you can use to change the field value before import.