Mysql DAYOFYEAR
From w3cyberlearnings
Contents |
MySQL DAYOFYEAR Function
This function returns day of a year. A total days of a year is 365 days or 366 days.
Syntax DAYOFYEAR
- expres: date or datetime expression.
DAYOFYEAR(expres);
Example 1
mysql> SELECT DAYOFYEAR('2012-05-22'); +-------------------------+ | DAYOFYEAR('2012-05-22') | +-------------------------+ | 143 | +-------------------------+ 1 row in set (0.00 sec)
Example 2
mysql> SELECT DAYOFYEAR('2012-01-22'); +-------------------------+ | DAYOFYEAR('2012-01-22') | +-------------------------+ | 22 | +-------------------------+ 1 row in set (0.00 sec)