title: How to convert a datetime to string in T-SQL
body: <p>I'm surprised not to be able to find this question here already.</p>
  
  <p>I have a date time var and I want to convert it to a string so that I can append it to another string. I want it in a format that can be converted easily back to a date time.</p>
  
  <p>How can I do this?</p>
  
  <p>(I want the date part and the time part.)</p>