In the last episode (Oct 17), Rene Fournier said:
> Okay, I realize that query won't work, but that's essentially want I
> want to do:
>
> Add four months to the current date, then return the first day of that
> month, e.g.:
>
> floor ( 2008-10-16 + 4 months ) = 2009-02-1
Since you know the first day of the month is always 01, this would work:
select cast(date_format(curdate() + interval 4 month,"%Y-%m-01") as date)
You can drop the cast if you're going to print the result directly, or
if you're going to plug it into a date column (mysql will do the cast
automatically)
--
Dan Nelson
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]