API - Date Formats

Mat Bradley-Tschirgi

Table of Contents

When using dates in APIs, the preferred format is Zulu time, which can be presented in one of the following ways: 

  • 2025-08-19T16:03:59.123Z
  • 1467331200.123456

Although other date formats can be used such as YYYYMMDD, we are discouraging users from doing so as this format may be deprecated in the future. 

  • 20240503

The complete list of supported date and time formats is below:

  • ['format' => 'Ymd', 'label' => 'YYYYMMDD']    
  • ['format' => 'Y-m-d', 'label' => 'YYYY-MM-DD']     
  • ['format' => 'Y-m-d H:i:s', 'label' => 'YYYY-MM-DD HH:MM:SS']    
  • ['format' => 'Y-m-d\TH:i:s', 'label' => 'ISO 8601 (no timezone)']    
  • ['format' => 'Y-m-d\TH:i:s\Z', 'label' => 'ISO 8601 (UTC Zulu)']      
  • ['format' => 'Y-m-d\TH:i:s.v\Z', 'label' => 'ISO 8601 (UTC Zulu with milliseconds)']    
  • ['format' => 'Y-m-d\TH:i:s.u\Z', 'label' => 'ISO 8601 (UTC Zulu with microseconds)']    
  • ['format' => 'Y-m-d\TH:i:sP', 'label' => 'ISO 8601 (with timezone offset)']
  • ['format' => 'Y-m-d H:i:sP', 'label' => 'ISO 8601 (space + timezone offset)']
  • ['format' => 'U', 'label' => 'Unix timestamp (seconds)']
  • ['format' => 'U.u', 'label' => 'Unix timestamp (microseconds)']

Here are some examples of different dates and times:

  • '20250813', // YYYYMMDD format
  • '2025-08-13', // YYYY-MM-DD format
  • '2025-08-13 10:24:00', // YYYY-MM-DD HH:MM:SS' 2024-08-13T14:30:00', // ISO 8601 format
  • '2025-08-13T16:32:00Z', // ISO 8601 with UTC timezone or (Zulu time)
  • '2025-08-13T16:32:00.123Z', // ISO 8601 with UTC timezone or (Zulu time with milliseconds)
  • '2025-08-13T16:32:00.123456Z', // ISO 8601 with UTC timezone or (Zulu time with microseconds)
  • '2025-08-13T16:32:00+03:00', // ISO 8601 with timezone offset
  • '2025-08-13 16:32:00+03:00', // ISO 8601 with space and timezone offset
  • '1691911440', // Unix timestamp (seconds since epoch)
  • '1691911440.123456', // Unix timestamp with microseconds
The Pinpointe Playbook