HOUR()
All functions > DATE AND TIME > HOUR()
Returns the hour component of a date or timestamp.
Signatures
Returns: The hour component
HOUR(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, 'hour') - Also accepts TIMESTAMP
Examples
FeatureQL
RETURN
-- Extract hour
f1 := DATE_PART(FROM_ISO8601_TIMESTAMP('2024-03-15T10:30:45'), 'hour')
;Result
| f1 BIGINT |
|---|
| 10 |
On this page