title: How to convert GetDate() to "YYYY-MM-DD-HHMM" format?
body: <p>I've been looking for the answer and could not find the exact one satisfying my needs.</p>
  
  <p>I'm looking for the way to convert <code>Datetime</code> value into <code>YYYY-MM-DD-HHMM</code> format.</p>
  
  <p>I tried that one:</p>
  
  <pre><code>select CONVERT(varchar(20),GETDATE(), 120) + replace(convert(varchar(5),getdate(),108),':','')
  </code></pre>
  
  <p>But it did not give me the right results</p>
  
  <p>Is there any practical way to do it? </p>