SQLTeam.com | Weblogs | Forums

Concat date parts


#1

Convert datetime 2015-06-30 00:00.000 to 06/30/2015
I tried datepart (mm,create_date) + '/' + datepart (dd,create_date) +'/' + datepart(yyyy,create_date)


#2

Try CONVERT(VARCHAR(10), create_date, 101)

The reason yours did not work is you are concatenating string and numeric datatypes


#3

Great that worked thx