- Categories:
DAYNAME¶
Extracts the three-letter day-of-week name from the specified date or timestamp.
Note
To return the full name for the day of the week instead of the three-letter day-of-week name,
you can use the EXTRACT function, the DECODE function, and the dayofweek part. See
EXTRACT for an example.
Syntax¶
Arguments¶
date_or_timestamp_exprA date or a timestamp, or an expression that can be evaluated to a date or a timestamp.
Returns¶
Returns a value of VARCHAR data type.
Examples¶
Use the TO_DATE function to get the abbreviation for the day of the week of April 1, 2024:
Use the TO_TIMESTAMP_NTZ function to get the abbreviation for the day of the week of April 2, 2024:
Get the abbreviation for the day of the week for each day from January 1, 2024, to January 8, 2024: