MAKEDATE()

Overview

Returns a date constructed from the year and day-of-year arguments.

USAGE

MAKEDATE(year, dayofyear)

Argument Name

Description

year

The numeric year

dayofyear

The day number in the year

DETAILS

MAKEDATE() is a date-time function that returns a date constructed from a numeric year and day number within the year.

The day-of-year value ranges from 1 to 365 or 366 depending on the year.

The return value is in the YYYY-MM-DD format when used in string context.

The return value is in the YYYYMMDD format when used in numeric context.

A NULL is returned if any argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT MAKEDATE(2020,  15) AS '2020,15',
       MAKEDATE(2019,  33) AS '2019,33',
       MAKEDATE(2021, 300) AS '2021,300',
       MAKEDATE(2019,   0) AS '2019,0';
+------------+------------+------------+--------+
| 2020,15    | 2019,33    | 2021,300   | 2019,0 |
+------------+------------+------------+--------+
| 2020-01-15 | 2019-02-02 | 2021-10-27 | NULL   |
+------------+------------+------------+--------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES