DAY_OF_WEEK
Tom Azernour avatar
Written by Tom Azernour
Updated over a week 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?