convert date column to mmddyyyy format

Trying to convert a date column so that output is in the form of mmddyyyy.

I am doing :
rtrim(convert(char,datepart(mm,Citations.dob)))+
rtrim(convert(char,datepart(dd,Citations.dob)))+
rtrim(convert(char,datepart(year,Citations.dob)))

However output is 912008 - it is getting rid of the leading zero in the month and day
jbeckstromAsked:
Who is Participating?
 
chapmandewConnect With a Mentor Commented:
select replace(convert(varchar(10), datefield, 101), '/', '')
0
 
jbeckstromAuthor Commented:
That did it.  Thanks.
0
All Courses

From novice to tech pro — start learning today.