0
votes

trying to get the weekday ie "sunday" from a datetime obj in big query using the below:

EXTRACT(WEEK (<WEEKDAY>) FROM closed_at) 

but no luck https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#extract

I get error:

Syntax error: Expected ")" but got "<" at [10:15]
1

1 Answers

1
votes

use below as an example

SELECT EXTRACT(WEEK (MONDAY) FROM closed_at)