title: How to change date to milliseconds ms sql server
body: <p>I'm trying to convert a date type in ms sql server to milliseconds here's what I've tried. I'm totally new to ms sql server and would appreciate someones help.</p>
  
  <pre><code>SELECT  datediff(ms,date(),a.ReportDate), a.Peak
  from [RealTimeUsage] a
  where exists(
      select top 10 * from 
      CustomerPortal.dbo.users b, CustomerPortal.dbo.UsersDevice c
      where (b.useridid = c.useridid) order by a.ReportDate 
  )
  </code></pre>