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
| Parameter | Type | Required | Description |
|---|---|---|---|
year | BIGINT | Yes | Year |
month | BIGINT | Yes | Month, 1 to 12 |
day | BIGINT | Yes | Day of the month |
Returns: The constructed DATE
MAKE_DATE(row: ROW) → DATE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
row | ROW | Yes | Named 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
| Status | Backends |
|---|---|
| Not available | mysql |
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 TIMESTAMP | f2 TIMESTAMP |
|---|---|
| 2024-03-15T00:00:00 | 2024-03-15T00:00:00 |
On this page