Streaming live at 10am (PST)

CMS Date Format?


#1

Hi there, I’m importing some content into my Webflow account, but I’m having trouble figuring out what the CMS Date format is.

It looks like this, in the API Reference:

 "updated-on": "2016-10-24T19:42:46.957Z"

Any ideas?


#2

Here’s your reference for date and time to SSV import into WF CMS.

https://www.w3.org/TR/NOTE-datetime

  YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
where:

 YYYY = four-digit year
 MM   = two-digit month (01=January, etc.)
 DD   = two-digit day of month (01 through 31)
 hh   = two digits of hour (00 through 23) (am/pm NOT allowed)
 mm   = two digits of minute (00 through 59)
 ss   = two digits of second (00 through 59)
 s    = one or more digits representing a decimal fraction of a second
 TZD  = time zone designator (Z or +hh:mm or -hh:mm)

If you missed this useful piece of info, you should read it too: https://university.webflow.com/article/importing-collection-items

Crafting your dates for CMS import can be a little tedious but it works. I imported 12000 of them into one site the other day :slight_smile:


#3

Awesome, thanks so much! Yes, I have a lot of content with the date stored as a text field, so I’m writing a script that will patch update the content with the correct date format.


#4

It’s worth noting that even if WF asks you for international time to be input, the CMS only know about PM/AM time to deal with in font, for the time being. There are tons of ways to build the date exactly as you want it, but only one option for time.

I’ve built a series of resources to help converting and translating date and time on Webflow. It’s all available on this page:

If by chance it can be of any help… feel free to use.