Skip to main content
Browse Documentation
Date formats

Date formats

Created by r.saunders, last modified by r.bromley on 13 Feb 2022

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

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 2015-01-01T07:28:00+01:00
yyyy-MM-ddThh:mm:ss.fK 2015-01-01T07:28:00.0+01:00
yyyy-MM-ddThh:mm:ss.ffK 2015-01-01T07:28:00.00Z
yyyy-MM-ddThh:mm:ss.fffK 2015-01-01T07:28:00.000Z
yyyy-MM-ddThh:mm:ss.ffffK 2015-01-01T07:28:00.0000Z
yyyy-MM-ddThh:mm:ss.fffffK 2015-01-01T07:28:00.00000Z
yyyy-MM-ddThh:mm:ss.ffffffK 2015-01-01T07:28:00.000000Z
yyyy-MM-ddThh:mm:ss.fffffffK 2015-01-01T07:28:00.0000000Z

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