MAKE_TIMESTAMP()
All functions > DATE AND TIME > MAKE_TIMESTAMP()
Builds a TIMESTAMP from a ROW of calendar and clock components.
Signatures
Returns: The constructed TIMESTAMP
MAKE_TIMESTAMP(row: ROW) → TIMESTAMP sql
| Parameter | Type | Required | Description |
|---|---|---|---|
row | ROW | Yes | Named fields: year, month, day, hour, minute, second; optional microsecond |
Notes
- Required field names are year, month, day, hour, minute, and second (case-insensitive).
- Optional field microsecond adds sub-second precision when present on the ROW type.
- The result is a naive TIMESTAMP (no timezone). To treat the components as local wall time in a zone and convert to UTC storage, wrap with LOCAL_TO_UTC(..., 'IANA_or_offset_name').
- second accepts numeric values; combine microsecond with integer second values when you need explicit microseconds.
Examples
FeatureQL
SELECT
f1 := MAKE_TIMESTAMP(ROW(2024 AS year, 3 AS month, 15 AS day, 14 AS hour, 30 AS minute, 45 AS second)), -- Construct a TIMESTAMP without microseconds
f2 := LOCAL_TO_UTC(MAKE_TIMESTAMP(ROW(2024 AS year, 3 AS month, 15 AS day, 14 AS hour, 30 AS minute, 45 AS second)), 'Europe/Paris') -- Local Paris wall time → UTC (CET = UTC+1 in March)
;Result
| f1 TIMESTAMP | f2 TIMESTAMP |
|---|---|
| 2024-03-15T14:30:45 | 2024-03-15T13:30:45 |
On this page