Skip Navigation

[Closed] Custom date field issue

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

This topic contains 3 replies, has 2 voices.

Last updated by Caridad 11 years, 10 months ago.

Author
Posts
#10910

I created a custom date field and imported data. The date is in the field, but when I try to edit the records, the date shows 1/1/70 in the date picker field and if I modify it it send a serial date to the database. Can we only use serial dates? What am I missing or doing wrong with this custom date. I'm also importing the post date with the same formatting and it works fine. Any help appreciated.

#10915

Dear Glynn,

Dates are kept as timestamps in the DB. You can modify the import script and run strtotime() on the date to get a timestamp.

Please let me know if there is anything else that I can assist you with.

Regards.
Caridad

#10936

If I simply enter a manual entry into the custom form field and use 05/17/1986 as the date from the date picker it saves 516672000 in the database field. The form also saves nothing to the database if I put in a date prior to 1/1/1900 from the date picker.

#11163

Dear Glynn,

This is a limitation of the timestamp format. The number is how many seconds since 1/1/1970

Please let me know if there is anything else that I can assist you with.

Regards.
Caridad

The topic ‘[Closed] Custom date field issue’ is closed to new replies.