Tabular IQ
Back to Function Index

DAYNAME()

Overview

DAYNAME() returns the full name of the day of the week for a given date. This function is useful for date-based reporting, filtering, and display formatting where you need to show or work with the day names rather than numeric values.

Function Format

DAYNAME(date)

Return Value

DAYNAME() returns a character string containing the full day name, or an empty string for NULL dates

Examples


DAYNAME(DATE("12/25/2025"))           = "Thursday"
DAYNAME(DATE(2025, 12, 25))          = "Thursday"
DAYNAME(DATE("2025-01-01"))          = "Wednesday"
DAYNAME(DATE("2025-02-28"))          = "Friday"
DAYNAME(DATE("2025-03-31"))          = "Monday"
DAYNAME(CURDATE())                   = "Wednesday"  (if run on March 19, 2025)
DAYNAME(NULL)                        = ""

Notes

  • The function returns the full name of the day (e.g., "Monday", "Tuesday", etc.).
  • If the input date is NULL, the function returns an empty string ("").
  • Common use cases include:
    • Date-based reporting and display
    • Day-of-week filtering
    • Schedule and calendar applications
    • Business day calculations
  • The function can be used with any valid date expression, including:
    • Date literals
    • Date columns
    • Date functions
    • Date arithmetic expressions
  • This function is equivalent to TO_CHAR(date, 'Day') in some database systems.
  • The day names are returned in the system's default language.

See Also