This article is about Looker Studio. For Looker documentation, visit


Returns a number representing the day of the week for a given date.

Sample usage



1) Returns the weekday from a Date value.


2) Returns the month from a compatibility mode Date value.

WEEKDAY(X [,format_string])


  • date_expression - a Date & Time field or expression.
  • X - a field or expression that evaluates to Text, Number, or compatibility mode Date.
  • format_string - format for X. Optional if X is correctly configured as a semantic date field.

Input format for compatibility mode dates

Supported date functions accept the following input formats if X is a Text field or expression, or compatibility mode Date:

  • Any valid strptime format is accepted.
  • 'BASIC': %Y/%m/%d-%H:%M:%S
  • 'DEFAULT_DASH': %Y-%m-%d [%H:%M:%S]
  • 'DEFAULT_SLASH': %Y/%m/%d [%H:%M:%S]
  • 'DEFAULT_DECIMAL': %Y%m%d [%H:%M:%S
  • 'RFC_1123': for example, Sat, 24 May 2008 20:09:47 GMT
  • 'RFC_3339': for example, 2008-05-24T20:09:47Z

Supported time functions accept the following input format if X is a Number field or expression:

  • 'SECONDS': seconds since Epoch
  • 'MILLIS': milliseconds since Epoch
  • 'MICROS': microseconds since Epoch
  • 'NANOS': nanoseconds since Epoch
  • 'JULIAN_DATE': days since Epoch


Example formula Input Output
WEEKDAY(Date) Jan 1, 2019 2
WEEKDAY(Date as Text, 'BASIC') 2019/01/01-09:40:45 2
WEEKDAY(Date as Number, 'SECONDS') 1561784874 6

WEEKDAY(Date as lots of Numbers, 'MILLIS')

1562004058620 1


This function works with both compatibility mode dates and upgraded Date and Date & Time data types.

Days are counted from Sunday and the value of Sunday is 0, therefore the value of Saturday is 6.

Was this helpful?

How can we improve it?
What's new in Looker Studio?

Learn about new features and recent changes. Looker Studio release notes live on Google Cloud.

Clear search
Close search
Google apps
Main menu