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
ParameterTypeRequiredDescription
rowROWYesNamed 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
    -- Construct a TIMESTAMP without microseconds
    f1 := MAKE_TIMESTAMP(
        ROW(
            2024 AS year,
            3 AS month,
            15 AS day,
            14 AS hour,
            30 AS minute,
            45 AS second
        )
    ),
    -- Local Paris wall time → UTC (CET = UTC+1 in March)
    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'
    )
;
Result
f1 TIMESTAMPf2 TIMESTAMP
2024-03-15T14:30:452024-03-15T13:30:45

Last update at: 2026/06/20 10:08:10