VistaDB 6
VistaDB / Developer's Guide / SQL Reference / Functions / Date and Time Functions / DATENAME
In This Topic
DATENAME
In This Topic
varchar DATENAME( datepart, date )

Returns a character string of the requested part of the date.

The following are valid datepart parameters:

Datepart Abbreviations
year yy, yyyy
quarter qq, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
weekday dw, w (Sunday, Monday, etc)
hour hh
minute mi, n
second ss, s
millisecond ms



Example

Output: January

Output: Monday
SELECT DATENAME(weekday, '1/1/2007');
SELECT DATENAME(month, '1/1/2007');
See Also