Skip to main content

Dates 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

FormatExample
yyyy-MM-dd2015-01-01
yyyy-MM-dd hh:mm2015-01-01 07:28
yyyy-MM-dd hh:mm:ss2015-01-01 07:28:00
yyyy-M-d2015-1-1
yyyy-M-d hh:mm2015-1-1 07:28
yyyy-M-d hh:mm:ss2015-1-1 07:28:00
yyyy-M-dd2015-1-01
yyyy-M-dd hh:mm2015-1-01 07:28
yyyy-M-dd hh:mm:ss2015-1-01 07:28:00
yyyy-MM-d2015-01-1
yyyy-MM-d hh:mm2015-01-1 07:28
yyyy-MM-d hh:mm:ss2015-01-1 07:28:00

Forward slash (/) separated

FormatExample
yyyy/MM/dd2015/01/01
yyyy/MM/dd hh:mm2015/01/01 07:28
yyyy/MM/dd hh:mm:ss2015/01/01 07:28:00
yyyy/M/d2015/1/1
yyyy/M/d hh:mm2015/1/1 07:28
yyyy/M/d hh:mm:ss2015/1/1 07:28:00
yyyy/M/dd2015/1/01
yyyy/M/dd hh:mm2015/1/01 07:28
yyyy/M/dd hh:mm:ss2015/1/01 07:28:00
yyyy/MM/d2015/01/1
yyyy/MM/d hh:mm2015/01/1 07:28
yyyy/MM/d hh:mm:ss2015/01/1 07:28:00

ISO 8601 Format

Date/times can also be provided in ISO 8601 format with the following levels of precision:

FormatExample
yyyy-MM-ddThh:mmK2015-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

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request