title: How to format datetime in SQL SERVER
body: <p>I am trying to port MySQL function <code>DATE_FORMAT(date,'%y-%m-%d %h:%i:%s %p')</code> to MsSQL equivalent by using <code>CONVERT()</code>.<br>
  How to format equivalent datetime string in SQL SERVER 2012 to give this output <code>'2014-05-24 01:24:37 AM'</code>?</p>