Skip to main content
DAY_OF_WEEK
Tom Williams avatar
Written by Tom Williams
Updated over a year ago

Type: Function

Function: DAY_OF_WEEK

Syntax: DAY_OF_WEEK(datetime)

Description: Returns the day of the week (between 1 and 7) for the provided datetime.

Sample usage:

  • DAY_OF_WEEK(created_at) returns the day of the week (between 1 and 7) for the created_at field value

  • DAY_OF_WEEK(DATE(2023, 08, 27)) => 7 (Sunday)

Did this answer your question?