DECLARE @day CHAR(2) SET @day = DATEPART(DAY, GETDATE()) PRINT @day
If today was the 9th of December, the above would print \"9\".
I want
SQL Server 2012+ (for both month and day):
SELECT FORMAT(GetDate(),'MMdd')
If you decide you want the year too, use:
SELECT FORMAT(GetDate(),'yyyyMMdd')