MAKE_DATE()

All functions > DATE AND TIME > MAKE_DATE()

Builds a DATE from its year, month and day, given as three arguments or as a ROW.

Signatures

Returns: The constructed DATE

MAKE_DATE(year: BIGINT, month: BIGINT, day: BIGINT) → DATE
sql
ParameterTypeRequiredDescription
yearBIGINTYesYear
monthBIGINTYesMonth, 1 to 12
dayBIGINTYesDay of the month

Returns: The constructed DATE

MAKE_DATE(row: ROW) → DATE
sql
ParameterTypeRequiredDescription
rowROWYesNamed fields: year, month, day (same names required by inference)

Notes

  • MAKE_DATE(year, month, day) takes integer parts; the ROW form must use the field names year, month, and day (case-insensitive).
  • Each component is passed through to the SQL backend's date constructor for the active dialect.

Availability

StatusBackends
Not availablemysql

Examples

FeatureQL
RETURN
    -- Construct a DATE from three parts
    f1 := MAKE_DATE(2024, 3, 15),
    -- Construct a DATE from parts
    f2 := MAKE_DATE(ROW(2024 AS year, 3 AS month, 15 AS day))
;
Result
f1 TIMESTAMPf2 TIMESTAMP
2024-03-15T00:00:002024-03-15T00:00:00