DECLARE @Month int
DECLARE @Year int
set @Month = 2
set @Year = 2012
select DATEADD(month,@Month-1,DATEADD(year,@Year-1900,0)) /*First*/
select DATEADD(day,-1,DATEADD(month,@Month,DATEADD(year,@Year-1900,0))) /*Last*/
DECLARE @Year int
set @Month = 2
set @Year = 2012
select DATEADD(month,@Month-1,DATEADD(year,@Year-1900,0)) /*First*/
select DATEADD(day,-1,DATEADD(month,@Month,DATEADD(year,@Year-1900,0))) /*Last*/
No comments:
Post a Comment