WEEK()
All functions > DATE AND TIME > WEEK()
Returns the week component of a date or timestamp.
Signatures
Returns: The week component
WEEK(timestamp: T) → BIGINT sql
| Parameter | Type | Required | Description |
|---|---|---|---|
timestamp | T | Yes | A DATE or TIMESTAMP value |
With:
T: Custom types: DATE | TIMESTAMP
Notes
- Permissive spelling of
DATE_PART(timestamp, 'week') - Also accepts TIMESTAMP
Examples
FeatureQL
RETURN
-- Extract week
f1 := DATE_PART(DATE '2024-03-15', 'week')
;Result
| f1 BIGINT |
|---|
| 11 |
On this page