MAKEDATE(year,dayofyear)
Returns a date, given year
and day-of-year values
. dayofyear
must be greater than 0 or the result is NULL.
SELECT MAKEDATE(2011,31), MAKEDATE(2011,32); +-------------------+-------------------+ | MAKEDATE(2011,31) | MAKEDATE(2011,32) | +-------------------+-------------------+ | 2011-01-31 | 2011-02-01 | +-------------------+-------------------+ SELECT MAKEDATE(2011,365), MAKEDATE(2014,365); +--------------------+--------------------+ | MAKEDATE(2011,365) | MAKEDATE(2014,365) | +--------------------+--------------------+ | 2011-12-31 | 2014-12-31 | +--------------------+--------------------+ SELECT MAKEDATE(2011,0); +------------------+ | MAKEDATE(2011,0) | +------------------+ | NULL | +------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/makedate/