Friday, November 14, 2008

Get the Number of Days in a Month in Sql Server 2005

Get the Number of Days in a Month [Sql Server 2005]
Using SQL statement or SQL Query to calculating the Number of Days in a Month

SELECT convert(varchar,datepart(dd,DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())+1,0))))