The DATETIMENAME() function returns the specified part of a given date. If the part is a month or day of the week, it returns the name of that month or day, otherwise it returns a string containing the numerical representation.
Syntax
DATETIMENAME(timeunit, date-time)
Arguments
Argument
Data type
Description
Required
Additional information
timeunit
string
String value that specifies the time unit for the duration to be added to the target date-time.