WEEK

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the ISO 8601 week number from a timestamp. This function is equivalent to EXTRACT(WEEK FROM ...).

Syntax 

1week(<timestamp>)

Arguments 

Required 

  • <timestamp>: The timestamp to extract the week number from.

Returns 

Returns the ISO 8601 week number as an integer.

Examples 

Extract the Week from a Timestamp 

Get the ISO 8601 week number from a timestamp.

1SELECT week(timestamp '2001-02-16 20:38:40') AS result;

Returns 7.

Related Documentation 

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!