Skip Navigation

[Resolved] importing date custom fields to database got issue

This support ticket is created 6 years, 11 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 1.98 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Jeffrey 6 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#595859

I am trying to import some custom fields to posts using CSV. The date value on CSV file is like May-01-2017, but I saw that those custom field value of toolset was like "1512864000". I have read some article , and knew the meaning that it is Unix timestamp (seconds since Unix Epoch) . so if importing date fields directly to custom fields is not possible. how Can I import those from resource to the custom date field of post instead of changing custom fields type? (I can change custom fields type to Single line, but it will cause that I can not build a filter by date field.)

Best regards!

#595881

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The reason you see "1512864000" stored with date field is because Types date field store date value as timestamp into database.

So, for you, either you need to import your date as timestamp or you need to build such custom script that you need to run after your import that should convert your date value to timestamp.

#598256

Thank you so much Minesh, I have read about some articles from stackoverflow. but I thought that was too difficult for me. I also read a thread on wp-types.com, but did get a solution. could you please give a solution if possible? Thank you so much

#598371

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I would really love to help you further and share needed solution but to provide you such custom solution is beyond the scope of our support policy because it needs custom programming.

If you need custom programming, please feel free to contact our certified partners.
=> https://toolset.com/contractors/

#599451

Got it Thank you Minesh!