--Get month names with month numbers ; WITH months ( MonthNumber ) AS ( SELECT 0 UNION ALL SELECT MonthNumber + 1 FROM months WHERE MonthNumber < 12 ) SELECT DATENAME ( MONTH , DATEADD ( MONTH ,- MonthNumber , GETDATE ())) AS [MonthName] , Datepart ( MONTH , DATEADD ( MONTH ,- MonthNumber , GETDATE ())) AS MonthNumber FROM months ORDER BY Datepart ( MONTH , DATEADD ( MONTH ,- MonthNumber , GETDATE ())) ; --Get name of day select DATENAME ( WEEKDAY , GETDATE ()) AS TodayIs --Get first date of current month SELECT CONVERT ( VARCHAR ( 25 ), DATEADD ( DAY ,-( DAY ( GETDATE ()))+ 1 , GETDATE ()), 105 ) FirstDate ; --Get last date of current month SELECT CONVERT ( VARCHAR ( 25 ), DATEADD ( DAY ,-( DAY ( GETDATE ())), DATEADD ( MONTH , 1 , GETDATE ())), 105 ) LastDate ; --Get first date of previous month select DATEADD (...