Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa SQL how to find last day 0f any given month in mysql?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


shabla Habeeb
how to find last day 0f any given month in mysql?
2 Answer(s)      4 years and a month ago
Posted in : SQL


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


Advertisement
View Answers

December 2, 2010 at 5:00 PM


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



December 22, 2010 at 2:08 PM


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

thanks,



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com