title: VBA subtract date and times
body: <pre><code>Dim dtmStart As Date, dtmEnd As Date, dblDuration As Double
  dtmStart = "1900/01/01 08:10:00"
  dtmEnd = "1900/01/03 21:16:00"
  dblDuration = DateDiff("hh:mm", dtmEnd, dtmStart)
  'dblDuration = dtmEnd - dtmStart
  MsgBox Format(dblDuration, "hh:mm")
  </code></pre>
  
  <p>How would I subtract two dates in a "yyyy/mm/dd hh:mm:ss" format? I tried both methods above and neither work</p>