Date formats
Log in to add to favouritesDates in Contensis can be queried using the following formats when using our APIs, either through a JSON search or using ZenQL. We support hyphenated or slash-based date formatting, as well as fully qualified ISO8601 dates.
Hyphen (-) separated
Format | Example |
---|---|
yyyy-MM-dd | 2015-01-01 |
yyyy-MM-dd hh:mm | 2015-01-01 07:28 |
yyyy-MM-dd hh:mm:ss | 2015-01-01 07:28:00 |
yyyy-M-d | 2015-1-1 |
yyyy-M-d hh:mm | 2015-1-1 07:28 |
yyyy-M-d hh:mm:ss | 2015-1-1 07:28:00 |
yyyy-M-dd | 2015-1-01 |
yyyy-M-dd hh:mm | 2015-1-01 07:28 |
yyyy-M-dd hh:mm:ss | 2015-1-01 07:28:00 |
yyyy-MM-d | 2015-01-1 |
yyyy-MM-d hh:mm | 2015-01-1 07:28 |
yyyy-MM-d hh:mm:ss | 2015-01-1 07:28:00 |
Forward slash (/) separated
Format | Example |
---|---|
yyyy/MM/dd | 2015/01/01 |
yyyy/MM/dd hh:mm | 2015/01/01 07:28 |
yyyy/MM/dd hh:mm:ss | 2015/01/01 07:28:00 |
yyyy/M/d | 2015/1/1 |
yyyy/M/d hh:mm | 2015/1/1 07:28 |
yyyy/M/d hh:mm:ss | 2015/1/1 07:28:00 |
yyyy/M/dd | 2015/1/01 |
yyyy/M/dd hh:mm | 2015/1/01 07:28 |
yyyy/M/dd hh:mm:ss | 2015/1/01 07:28:00 |
yyyy/MM/d | 2015/01/1 |
yyyy/MM/d hh:mm | 2015/01/1 07:28 |
yyyy/MM/d hh:mm:ss | 2015/01/1 07:28:00 |
ISO 8601 Format
Date/times can also be provided in ISO 8601 format with the following levels of precision:
Format | Example |
---|---|
yyyy-MM-ddThh:mmK | 2015-01-01T07:28+01:00 |
yyyy-MM-ddThh:mm:ssK | |
yyyy-MM-ddThh:mm:ss.fK | |
yyyy-MM-ddThh:mm:ss.ffK | |
yyyy-MM-ddThh:mm:ss.fffK | |
yyyy-MM-ddThh:mm:ss.ffffK | |
yyyy-MM-ddThh:mm:ss.fffffK | |
yyyy-MM-ddThh:mm:ss.ffffffK | |
yyyy-MM-ddThh:mm:ss.fffffffK |
Date format notation
The date formats documented are structured with the following notation:
- yyyy = a four-digit year
- MM = a zero padded month, from 01 to 12
- M = non zero padded month, from 1 to 12
- dd = a two-digit day of the month, from 01 to 31
- d = non zero padded day, from 1 to 31
- hh = two digits for the hour, from 00 to 23
- mm = two digits for the minutes, from 00 to 59
- ss = two digits for the seconds, from 00 to 59
- f = a decimal fraction of accuracy
- K = the timezone in the format 'Z' or [+|-]hh:mm. Z is equivalent to +00:00