How do you change the DATEPART format of the month to include the 0 in front of the month?
For instance 5 should be 05.
What I have tried, but none of it works, (only gives me 5)
Createdate = 2008-07-25 13:43:48.000
CONVERT(varchar(2), DATEPART(MONTH,(CreatedDate)))
CONVERT(varchar(2), DATEPART(MM,(CreatedDate)))
I often use RIGHT as a cheap way to CONVERT.
select RIGHT(100+MONTH(CreatedDate),2)