Export (0) Print
Expand All

Unseparated String Format

SQL Server 2000

Unseparated String Format

Microsoft® SQL Server™ 2000 allows you to specify date data as an unseparated string. The date data can be specified with four, six, or eight 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 (numeric entries without separators). Six- or eight-digit strings are always interpreted as ymd. The month and day must always be two digits.

This is the valid unseparated string format:

[19]960415

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

See Also

Date and Time Data

datetime and smalldatetime

SET DATEFORMAT

Show:
© 2014 Microsoft