SALES: 1-800-867-1380

Formatting DateTime Property Values

Updated: February 26, 2015

DateTime property values must be represented as combined Coordinated Universal Time (UTC) values. The Timestamp property, which is an opaque property maintained by the Table service, is also represented in this format. UTC formats are described by ISO 8601.

An example of the combined UTC format is as follows. The date is specified first, followed by the literal string "T", which designates the beginning of the time element. The literal string "Z" at the end of the string designates that the time is expressed in UTC:

2009-03-18T04:25:03Z

The following code example shows one way to construct the combined UTC format from the current UTC date:

string roundtripDateTime = XmlConvert.ToString(DateTime.UtcNow, XmlDateTimeSerializationMode.RoundtripKind);

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft