title: Convert SQL Server 2008 R2 Datetime to Varchar in ddmmyyyyhhmm format
body: <p>I am looking to convert a Datetime to Varchar(12) in ddmmyyyyhhmm format.</p>
  
  <p>I can get ddmmyyyy from <a href="https://stackoverflow.com/questions/6770542/return-date-as-ddmmyyyy-in-sql-server">here</a>. But is there an easy way to get the entire string using a single conversion code (like 103 or 133) or should I get date and time separately then merge it. </p>
  
  <p>Thanks</p>
  
  <p>Update : Found the answer with some help from scott.</p>
  
  <pre><code>Replace(CONVERT(CHAR(10), GETDATE(), 103),'/','') + Replace(CONVERT(CHAR(5), GETDATE(), 108),':','')
  </code></pre>