SQL Server |
3 Feb 2010
Updated: 3 Feb 2010
Rating: 0.00/5
Votes: 0
Popularity: 0.00
Licence: CPOL
Views: 4,900
Bookmarked: 0
Downloaded: 0
@dt is a datetime valuederive the first of this month, add a month to itthen subtract 1 day to get the last day of this monthselect days_of_month=day( dateadd(d,-1, dateadd(m,1, dateadd(d,1-day(@dt), @dt) ) ) )
|