Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ISO 8601 Format

ISO 8601 Format

SQL Server 2005

In Microsoft SQL Server 2005, you can specify date and time data by using the ISO 8601 format.

This is the format:

yyyy-mm-ddThh:mm:ss[.mmm]

The T indicates the start of the time part of the datetime value.

To use the ISO 8601 format, you must specify each element in the format. This also includes the punctuation marks that are shown in the format.

ms190977.note(en-US,SQL.90).gifNote:
The brackets indicate that the fraction of seconds component is optional. The time component is specified in the 24-hour format.

The advantage in using the ISO 8601 format is that it is an international standard. Also, datetime values that are specified by using this format are unambiguous. Also, this format is not affected by the SET DATEFORMAT or SET LANGUAGE settings.

Following are two examples of datetime values that are specified in the ISO 8601 format:

2004-05-23T14:25:10
2004-05-23T14:25:10.487

Community Additions

ADD
Show:
© 2015 Microsoft