The function DATENAME ( datepart , date ) returns a character string representing the specified datepart of the specified date. An argument representing the datepart can be one of the values listed in above table.
The function gives us a simple opportunity to concatenate the date components to get any required format. For example, the query
Wednesday, 31 December 2003
Notice that DATENAME function reveals the difference between day and dayofyear values of the datepart argument. The first gives a character representation of the day of the specified date, whereas the second gives a character representation of this day from the origin of a year, i.e.
Suggested exercises: 110