Syntax
MAKEDATE(year,dayofyear)
Purpose
You can call this function to return the date of the day number specified for dayofyear of the specified year. The value of dayofyear must be greater than 0. Otherwise, this function returns NULL.
If the value of dayofyear is greater than 366, the extra days more than the actual number of days of the specified year are added to the specified year. If the sum is greater than 9999, this 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 (0.00 sec)
obclient> SELECT MAKEDATE(2011,0);
+------------------+
MAKEDATE(2011,0)
+------------------+
NULL
+------------------+
1 row in set (0.01 sec)
obclient> SELECT MAKEDATE(2011,2917923);
+------------------------+
MAKEDATE(2011,2917923)
+------------------------+
NULL
+------------------------+
1 row in set (0.00 sec)