---
schema_version: "1"
id: 81b2eb157b528984fb94cde4940d5633dbc4bd5b2a8ab48c64ffda5fdd6f663c
title: Valid Date and DateTime Formats
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/intro/intro-valid-date-formats.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/intro-valid-date-formats.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0356f03d38298b1053ced79c1e7d91e218e5aaa952ca40bc6a25670e94e08aa9
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Valid Date and DateTime Formats

Specify the right format for `dateTime` and `date` fields.

## dateTime

Use the yyyy-MM-ddTHH:mm:ss.SSS+/-HH:mm or yyyy-MM-ddTHH:mm:ss.SSSZ formats to specify `dateTime` fields.

-   `yyyy` is the four-digit year
-   `MM` is the two-digit month (01-12)
-   `dd` is the two-digit day (01-31)
-   'T' is a separator indicating that time-of-day follows
-   `HH` is the two-digit hour (00-23)
-   `mm` is the two-digit minute (00-59)
-   `ss` is the two-digit seconds (00-59)
-   `SSS` is the optional three-digit milliseconds (000-999)
-   `+/-HH:mm` is the Zulu (UTC) time zone offset
-   'Z' is the reference UTC timezone

When a timezone is added to a UTC `dateTime`, the result is the date and time in that timezone. For example, 2002-10-10T12:00:00+05:00 is 2002-10-10T07:00:00Z and 2002-10-10T00:00:00+05:00 is 2002-10-09T19:00:00Z. See [W3C XML Schema Part 2: DateTime Datatype](http://www.w3.org/TR/xmlschema-2/#dateTime).

## date

Use the yyyy-MM-dd format to specify `date` fields.

**note:** Specifying an offset for `date` is not supported.

