DATENAME returns a string value for the part of a date specified in the datepart code. The syntax is: DATENAME ( datepart , date ) The second parameter designates the date to base the string value on.