0004
0004

Reputation: 1260

BigQuery - Return Weekday Value from date obj

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]

Upvotes: 0

Views: 191

Answers (1)

Mikhail Berlyant
Mikhail Berlyant

Reputation: 172993

use below as an example

SELECT EXTRACT(WEEK (MONDAY) FROM closed_at)    

Upvotes: 1

Related Questions