title: C++ date & time with milliseconds
body: <p><strong>Requirement</strong></p>
  
  <p>I need to retrieve the date and time including milliseconds in C++11 on Windows. If possible, beginning earlier than 1970.</p>
  
  <p>I also need to be able to extract year, month, day, hour, second and millisecond from the date/time variable.</p>
  
  <p><strong>What I've tried</strong></p>
  
  <ul>
  <li><code>time()</code> only returns seconds.</li>
  <li><code>clock()</code> doesn't return a date, only time since last system start. Good for measuring elapsed time, tho.</li>
  </ul>
  
  <p>Note: It only has to work with Windows. Linux is not required.</p>