The date parts, the abbreviations recognized by Adaptive Server, and the acceptable values are:
Date part |
Abbreviation |
Values |
---|---|---|
yy |
1753 – 9999 (2079 for smalldatetime) |
|
quarter |
1 – 4 |
|
mm |
1 – 12 |
|
week |
wk |
1 – 54 |
dd |
1 – 31 |
|
dayofyear |
dy |
1 – 366 |
weekday |
dw |
1 – 7 (Sun. – Sat.) |
hour |
hh |
0 – 23 |
minute |
mi |
0 – 59 |
second |
ss |
0 – 59 |
millisecond |
ms |
0 – 999 |
When you enter a year as two digits (yy):
Numbers less than 50 are interpreted as 20yy.
For example, 01
is 2001, 32
is
2032, and 49
is 2049.
Numbers equal to or greater than 50 are interpreted
as 19yy. For example, 50
is
1950, 74
is 1974, and 99
is
1999.
Milliseconds can be preceded either with a colon or a period. If preceded by a colon, the number means thousandths of a second. If preceded by a period, a single digit means tenths of a second, two digits mean hundredths of a second, and three digits mean thousandths of a second. For example, “12:30:20:1” means twenty and one-thousandth of a second past 12:30; “12:30:20.1” means twenty and one-tenth of a second past 12:30. Adaptive Server may round or truncate millisecond values when inserting datetime or time data, as these datatypes have a granularity of 1/300th of a second rather than 1/1000th of a second. You can use the time datatype for time information.