title: Calculate time difference in Windows batch file
body: <p>How can I get the difference between two times in a Batch file? Because I want to print it in an HTML file.</p>
  
  <p>I thought this would be possible, but it isn't.</p>
  
  <pre><code>Set "tijd=%time%"
  echo %tijd%
  echo %time%-%tijd%
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>11:07:48,85
  11:16:58,99-11:07:48,85
  </code></pre>
  
  <p>But what I want is:</p>
  
  <pre><code>00:09:10,14
  </code></pre>
  
  <p>Or 9 minutes and 10 seconds or 550 seconds</p>