DECLARE @MonthEndInd bit
DECLARE @MonthEnd char(8)
DECLARE @Today char(8)
SELECT @MonthEnd = CONVERT(varchar , DateAdd(Month, DateDiff(Month, 0, Dateadd(month, 1, getdate())), 0) -1 , 112)
SELECT @Today = CONVERT(varchar,GETDATE(),112)
IF @Today = @MonthEnd
BEGIN
SELECT @MonthEndInd = 1
END
ELSE
SELECT @MonthEndInd = 0
dumping ground for code that might be useful sometime, somewhere. Beware the formatting mangle of the blog post...
Sunday, May 6, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment