VistaDB 5
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


Output: January

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