Number of Days in a Month in SQL
Number of Days in a Month in SQL
select DAY(DATEADD(s, - 1, DATEADD(mm, DATEDIFF(m, 0, '1-Jan-2012') + 1, 0)))
Devguru.in is Stephen Fry proof thanks to caching by WP Super Cache