Skip to content

Commit 97d69c4

Browse files
committed
Updating dateTime doc
1 parent ca3878f commit 97d69c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/cosmos-db/working-with-dates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In addition to the basic types, many applications need the DateTime type to repr
1414

1515
## Storing DateTimes
1616

17-
Azure Cosmos DB is scoped to the JSON types which does not include a datetime type. So, in Azure Cosmos DB, dates must be stored as strings. The recommended format for datetime strings in Azure Cosmos DB is `YYYY-MM-DDThh:mm:ss.sssZ` which follows the ISO 8601 UTC standard. Formatting the strings in this format will allow sorting dates lexicographically. Currently Azure Cosmos DB doesn't support localization of dates. Logic to handle non-UTC dates must be defined by the client. Most applications can use the default string representation for DateTime for the following reasons:
17+
Azure Cosmos DB is scoped to the JSON types which does not include a DateTime type. So, in Azure Cosmos DB, dates must be stored as strings. The recommended format for datetime strings in Azure Cosmos DB is `YYYY-MM-DDThh:mm:ss.sssZ` which follows the ISO 8601 UTC standard. Formatting the strings in this format will allow sorting dates lexicographically. Currently Azure Cosmos DB doesn't support localization of dates. Logic to handle non-UTC dates must be defined by the client. Most applications can use the default string representation for DateTime for the following reasons:
1818

1919
* Strings can be compared, and the relative ordering of the DateTime values is preserved when they are transformed to strings.
2020
* This approach doesn't require any custom code or attributes for JSON conversion.

0 commit comments

Comments
 (0)