Specify the returned date format

The default format for returned dates depends on the API call. For example, let’s say you retrieve an asset with a creation date of April 26, 2025 at 1:14:40 PM. For Web APIs and DataTable APIs, this date is returned in the ISO 8601 standard: 2025-04-26T13:14:40. In the Search API, this date is returned as 4/26/2025 1:14:40 PM by default.

In the Search and DataTable APIs, you can return dates in a variety of formats by setting the dateformat parameter equal to a [format] specifier. Different [format] specifiers are based on the standard date and time formats available in the .NET programming language.

For the full list of standard specifiers, refer to Microsoft .NET docs.

Example:
The format specifier F returns a full date and time pattern.

[https://www.mangovations.orangelogic.com/API/DataTable/v2.2/Document.Image.Default:Read?CoreField.System-ID=DM4321&DateFormat=F]

Date returned: Monday, June 6, 2025 1:45:30 PM

Example:
The format specifier d returns a short date without time details.

[https://www.mangovations.orangelogic.com/API/Search/v3.0/search?query=SystemIdentifier:OLSI8597&fields=CreateDate&DateFormat=s]

Date returned: 06/15/2025

ℹ️

Notes

  • Date localization is based on server settings. All Orange Logic servers are set to United States of America (en-US) by default, so the dates and language return en-US formatted dates. For example:
    • 6/15/2009 rather than 2009/6/15 (China, Japan)
    • Monday, June 15, 2009 rather than Montag, 15. Juni 2009 (Germany)
    • 1:45 PM rather than 13:45 (France)
  • Orange Logic does not support custom date and time format strings.
  • Some formats include T as a separator between date and time, rather than a space.