Description
The MAKEDATE( ) function returns a date, year, and day-of-year values. The argument should be greater than 0. Else NULL is returned.
This function has the form:
SELECT MAKEDATE(year, dayofyear)
Parameter | Description |
---|---|
year | Year |
dayofyear | Day of year |
Return Value
Returns a date, year, and day-of-year values.
Examples
The following example shows the basic use of this function:
mysql> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);
-> '2011-01-31', '2011-02-01'
mysql> SELECT MAKEDATE(2011,365), MAKEDATE(2014,365);
-> '2011-12-31', '2014-12-31'
mysql> SELECT MAKEDATE(2011,0);
-> NULL