VeloDB Cloud
SQL Manual
Functions
date-time-functions
makedate

makedate

Description

Syntax:

DATE MAKEDATE(INT year, INT dayofyear)

This function returns a date which is made based on the given year and dayofyear. dayofyear must be greater than 0 or the returned result will be NULL.

Example

mysql> select makedate(2021,1), makedate(2021,100), makedate(2021,400);
+-------------------+---------------------+---------------------+
| makedate(2021, 1) | makedate(2021, 100) | makedate(2021, 400) |
+-------------------+---------------------+---------------------+
| 2021-01-01        | 2021-04-10          | 2022-02-04          |
+-------------------+---------------------+---------------------+

Keywords

MAKEDATE