Using datetime formats

When dates and times are included in JSON and DSV data objects, you define them as such in the object metadata. In this way, applications that use the metadata interpret the values as dates or times. Infor applications that use dates and times must follow the ISO 8601 RFC 3339 standard formats.

The JSON schema draft-06 supports these date and time formats for string instances:

  • date-time
  • date
  • time

When you include dates and times in your objects, ensure that you use date-time in UTC, if possible. Dates without a time and times without a date regularly occur in application data. Therefore, you can also use the date or time formats.

Standard format definitions

This table shows the standard format definitions:

Metadata definition Expected format in a data object Example data
“datetimeProperty”:{
	“type”:”string”,
	“format”:”date-time”
}
Note: Compass supports 3 fractional seconds.
yyyy-MM-ddTHH:mm:ss[.S]Z "2017-07-04T14:08:43Z" or "2017-07-04T14:08:43.123Z"
“dateProperty”:{
	“type”:”string”,
	“format”:”date”
}
yyyy-MM-dd “2017-07-04”
“timeProperty”:{
	“type”:”string”,
	“format”:”time”
}
Note: This format is not supported by Compass queries.
HH:mm:ss[.S] “14:08:43” or “14:08:43.123”