Syntax
MAKEDATE(year,dayofyear)
Purpose
Returns the date value for the dayofyearth day of the year year. If dayofyear is less than or equal to 0, the function returns NULL.
If dayofyear is greater than 366, the extra value is added to the year specified by year. If the resulting year exceeds 9999, the function returns NULL.
Examples
obclient> SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);
+-------------------+-------------------+
| MAKEDATE(2011,31) | MAKEDATE(2011,32) |
+-------------------+-------------------+
| 2011-01-31 | 2011-02-01 |
+-------------------+-------------------+
1 row in set
obclient> SELECT MAKEDATE(2011,0);
+------------------+
| MAKEDATE(2011,0) |
+------------------+
| NULL |
+------------------+
1 row in set
obclient> SELECT MAKEDATE(2011,2917923);
+------------------------+
| MAKEDATE(2011,2917923) |
+------------------------+
| NULL |
+------------------------+
1 row in set
