From: Dan Nelson Date: October 17 2008 9:06pm Subject: Re: FLOOR(DATE_ADD(CURDATE(), INTERVAL 4 MONTH)) -- ? List-Archive: http://lists.mysql.com/mysql/214946 Message-Id: <20081017210602.GJ99270@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 dnelson@stripped