Date Time Fields

Request

The API accepts date-time fields in the request body in the following three system formats:

  • yyyy-MM-dd'T'HH:mm:ss
  • yyyy-MM-dd'T'HH:mm:ssZ
  • yyyy-MM-dd'T'HH:mm:ss.Z

If you intend to provide the date fields in any other ISO 8601 complaint format, that format has to be provided as a value using the API header field Request-Date-Time-Format to properly parse the date field.

Example values for the header:

  • Any of the above system formats
  • ISO 8601 Standard formats, for example:
    • yyyy-MM-dd'T'HH:mm:ss+HH:mm
    • yyyy-MM-dd'T'HH:mm:ss.SSSZ

An invalid format error for the request is returned if the value for any date-time field provided in the request doesn't comply with the system or given header format.

Response

You can provide the date-time format in which you want to retrieve the date-time fields through the API header Response-Date-Time-Format to properly publish the date fields.

Example values for the above header:

  • OPC system format
    • yyyy-MM-dd'T'HH:mm:ss.Z
  • ISO 8601 Standard Formats, for example:
    • yyyy-MM-dd'T'HH:mm:ss
    • yyyy-MM-dd'T'HH:mm:ssZ
    • yyyy-MM-dd'T'HH:mm:ss+HH:mm
    • yyyy-MM-dd'T'HH:mm:ss.SSSZ

An invalid format error is returned if the header doesn't comply with the system format or the standard ISO 8601 formats.

Deprecation Notice: To ensure existing integrations continue to work as expected, the system is currently not throwing an error if a date field in any API is provided in a custom format which does not comply with the three supported system formats (yyyy-MM-dd'T'HH:mm:ss, yyyy-MM-dd'T'HH:mm:ssZ, yyyy-MM-dd'T'HH:mm:ss.Z) and is not specified via the "Request-Date-Time-Format" header. As this date field cannot be parsed, the system ignores the value and treats it as null. Since this is a potential issue as the user requested date value is not persisted, the process of ignoring a non-compliant date is deprecated and the system will start throwing an error starting in the 26.1 API release.