"Mike Blezien" <[EMAIL PROTECTED]> wrote on 04/04/2006 02:47:50 PM:
> Hello,
>
> is there a MySQL function to determine the total days of any given
> month, IE if
> current month is April, is there a function or query to find the
> total days of
> the month?
>
> TIA,
> Mike(mickalo)Blezien
>
Mike,
Maybe :
LAST_DAY(date)
Takes a date or datetime value and returns the corresponding value for
the last day of the month. Returns NULL if the argument is invalid.
mysql> SELECT LAST_DAY('2003-02-05');
-> '2003-02-28'
mysql> SELECT LAST_DAY('2004-02-05');
-> '2004-02-29'
m