Alphabetic Date Format
Microsoft® SQL Server™ allows you to specify date data with a month specified as the full month name (for example, April) or the month abbreviation (for example, Apr) given in the current language; commas are optional and capitalization (case) is ignored.
Here are some guidelines when using alphabetic date formats:
- Enclose the date and time data in single quotation marks (‘).
- These are the valid alphabetic formats for SQL Server date data (the [ ] characters indicate optional characters):
Apr[il] [15][,] 1996
Apr[il] 15[,] [19]96
Apr[il] 1996 [15]
[15] Apr[il][,] 1996
15 Apr[il][,][19]96
15 [19]96 apr[il]
[15] 1996 apr[il]
1996 APR[IL] [15]
1996 [15] APR[IL]
- If you specify only the last two digits of the year, values that are less than the last two digits of the value of the two digit year cutoff configuration option are in the same century as the cutoff year. Values that are greater than or equal to the value of this option are in the century that precedes the cutoff year. For example, if two digit year cutoff is 2050 (default), 25 is interpreted as 2025 and 50 is interpreted as 1950. To avoid ambiguity, use four-digit years.
- If the day is missing, the first day of the month is supplied.
- The SET DATEFORMAT session setting is not applied when you specify the month in alphabetic form.
See Also
(c) 1988-98 Microsoft Corporation. All Rights Reserved.