Export (0) Print
Expand All

Unseparated String Format

SQL Server 2005

Microsoft SQL Server 2005 allows you to specify date data as an unseparated string. The date data can be specified with 4, 6, or 8 digits, an empty string, or a time value without a date value.

The SET DATEFORMAT session setting does not apply to all-numeric date entries such as numeric entries without separators. The 6-digit or 8-digit strings are always interpreted as ymd. The month and day must always be 2 digits.

This is the valid unseparated string format:

[19]960415

A string of only 4 digits is interpreted as the year. The month and date are set to January 1. When specifying only 4 digits, you must include the century.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft