I\'m surprised not to be able to find this question here already.
I have a date time var and I want to convert it to a string so that I can append it to another stri
Try below :
DECLARE @myDateTime DATETIME SET @myDateTime = '2013-02-02' -- Convert to string now SELECT LEFT(CONVERT(VARCHAR, @myDateTime, 120), 10)