title: Windows console %DATE% Math
body: <p>I would like to set the date in a Windows batch file to 7 days ago from today. I would like to do this in the following format.</p>
  
  <pre class="lang-csh prettyprint-override"><code>set today=%date:~10,4%-%date:~4,2%-%date:~-7,2%
  </code></pre>
  
  <p>Any ideas how to subract the 7 day time delta here ?</p>