MAKEDATE
Declaration
MAKEDATE(year,dayofyear)
Description
Returns the date value of the dayofyearth day in the year year. If dayofyear is not greater than 0, NULL is returned.
If dayofyear is greater than 366, the extra value is added to the year specified by year. If the resulting year exceeds 9999, NULL is returned.
Examples
SELECT MAKEDATE(2011,31), MAKEDATE(2011,32);
+-------------------+-------------------+
| MAKEDATE(2011,31) | MAKEDATE(2011,32) |
+-------------------+-------------------+
| 2011-01-31 | 2011-02-01 |
+-------------------+-------------------+
1 row in set (0.001 sec)
SELECT MAKEDATE(2011,0);
+------------------+
| MAKEDATE(2011,0) |
+------------------+
| NULL |
+------------------+
1 row in set (0.001 sec)
SELECT MAKEDATE(2011,2917923);
+------------------------+
| MAKEDATE(2011,2917923) |
+------------------------+
| NULL |
+------------------------+
1 row in set (0.000 sec)