On 02-Mar-2003 Steffan A. Cline wrote:
> Is there a function that I missed for calculating the number of days in a
> month?
>
TO_DAYS()
mysql> set @b:='2003-02-01';
Query OK, 0 rows affected (0.00 sec)
mysql> set @e:='2003-03-01';
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT TO_DAYS(@e)
At 17:13 -0700 3/1/03, Steffan A. Cline wrote:
Is there a function that I missed for calculating the number of days in a
month?
No, but you can calculate it. One way:
- Find the first of the month
- Add a month
- Subtract a day. That gives you the last day of the month.
- Extract the day-of-the-m