
how to find last day of any given month in mysql?

Hi Friend,
Here is required code:
DECLARE @dtDate DATETIME SET @dtDate = '8/18/2007' SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,@dtDate)+1,0))
Thanks

hi, SELECT LASTDAY('2003-02-05')FROM tablename
thanks,