there is always something to develop
How to find a number of days in a month
To find the number of days in a month, the easiest way will be finding its last day date and just get the DAY part. As bellow:
declare @cDateTime datetime; set @cDateTime = '2009-02-04' select day(dateadd(d,-1,dateadd( month, datediff( month, 0, @cDateTime )+1,0 ))) as DaysInMonth
See also
Comments
"Winning isn't everything. But wanting to win is."
You are 3636 reader
since 1st April 2009
Yes | 0 | |
No | 0 |