title: SQL Format date to YYY-MM-DD 00:00:00.000
body: <p>I have multiple dates and I would like to set Hours, minutes, seconds and milliseconds to zero in the SELECT.</p>
  
  <p>For instance : 2017-10-10 15:23:28.603 becomes 2017-10-10 00:00:00.000</p>
  
  <p>So far I could set everything to zero expect Hours.</p>
  
  <pre><code>dateadd(hour, datepart(hour,getdate()),CAST(convert(varchar(20),getdate(),112) as datetime)) AS 'Date', 
  </code></pre>
  
  <p>Gives : 2017-10-10 15:00:00.000, how to get rid of the hours too ?</p>