Date parts

The date parts, the abbreviations recognized by Adaptive Server, and the acceptable values are:

Date part

Abbreviation

Values

year

yy

1753 – 9999 (datetime) 1753 – 2079 (smalldatetime) 0001 – 9999 (bigdatetime)

quarter

qq

1 – 4

month

mm

1 – 12

week

wk

1 – 54

day

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

microseconds

us

0-999999

When you enter a year as two digits (yy):

For datetime, smalldatetime and time values 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.

For bigdatetime and bigtime time values, microseconds must be preceded by a decimal point and represent fractional seconds.