This is how I compute a few useful dates in SQL Server:
declare @today datetime /* todays date only, no time */
declare @yesterday datetime /* yesterdays date */
declare @fdcm datetime /* first day, current month */
declare @ldcm datetime /* last day, current month */
declare @fdnm datetime /* first day, next month */
declare @ldpm datetime /* last day, previous month */
declare @fdpm datetime /* first day, previous month */
declare @ldppm datetime /* last day, month previous to previous */
set @today = convert(datetime,convert(varchar(11),getdate())) /* strip to date only */
-- set @today = convert(datetime,'2008-02-15')
set @fdcm = dateadd(dd,-(datepart(dd,@today)-1),@today)
set @fdnm = dateadd(mm,1,@fdcm)
set @ldcm = dateadd(dd,-1,@fdnm)
set @yesterday = dateadd(dd,-1,@today)
set @ldpm = dateadd(dd,-datepart(dd,@today),@today)
set @fdpm = dateadd(dd,-(datepart(dd,@ldpm))+1,@ldpm)
set @ldppm = dateadd(dd,-datepart(dd,@ldpm),@ldpm)
select @today as today
select @fdcm as first_day_current_month
select @fdnm as first_day_next_month
select @ldcm as last_day_current_month
select @yesterday as yesterday
select @ldpm as last_day_previous_month
select @fdpm as first_day_previous_month
select @ldppm as last_day_pre_previous_month
So, you can see we have several different, useful dates loaded into variables. Even if I just need @fdcm (first day, current month), I usually just toss the entire block of code into my proc.
I'm going to want to do similar date calcs in Oracle, too. If you've got similar date calcs in Oracle, please post them, as I'd like to to learn how Oracle developers typically address similar problems. And if you're an Oracle developer searching for a way to do similar date calcs in SQL Server, well, here you go.
If you want to see date examples other than today, just uncomment the second set of @today and fill in any date you like.