title: convert date format from mmddyy to yyyy-mm-dd hh:mm:sec
body: <p>I have a <code>date</code> format which I extracted from filename. this <code>date</code> is in format <code>'mmddyy'</code>.</p>
  
  <p>I want to <code>convert</code> it into <code>'yyyy-mm-dd hh:mm:sec'</code> format.</p>
  
  <p>For example
  <code>Date = 083115 -- mm = 08,dd=31,yy=15</code></p>
  
  <p><code>Result date = 2015-08-31:00:00:00
  time will always be 00:00:00</code></p>
  
  <p>I am using <code>SQL server 2012</code></p>
  
  <p>thanks</p>