title: how to convert Sql server Datetime in different format
body: <p>I have a column that store date and time values in the format YYYY-MM-DD HH:MM:SS.MSS. I have another table that store date and time value as <strong><em>string</em></strong> in the format 'M/D/YYYY HH:MM:SS AM'. </p>
  
  <p>Now how do I convert  YYYY-MM-DD HH:MM:SS.MSS this format to M/D/YYYY HH:MM:SS AM. After conversion can I able to compare conversion date to the datetime string.
  for e.g</p>
  
  <p>A.Date_time = '2013-01-08 12:04:00.000'
  B.Date_time = convert ( A.Date_time) -- convert in format M/D/YYYY HH:MM:SS AM
  ...</p>
  
  <p>if(B.Date_time = 'convert (A.Date_time)' -- how can I can compare conversion date with the datetime string.
  ...</p>