DAY()

All functions > DATE AND TIME > DAY()

Returns the day component of a date or timestamp.

Signatures

Returns: The day component

DAY(timestamp: T) → BIGINT
sql
ParameterTypeRequiredDescription
timestampTYesA DATE or TIMESTAMP value

With:

  • T : Custom types: DATE | TIMESTAMP

Notes

  • Permissive spelling of DATE_PART(timestamp, 'day')
  • Also accepts TIMESTAMP

Examples

FeatureQL
RETURN
    -- Extract day
    f1 := DATE_PART(DATE '2024-03-15', 'day')
;
Result
f1 BIGINT
15