title: How to format date in batch file
body: <pre><code>For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)
  </code></pre>
  
  <p>Here <code>mydate</code> is <code>20180416</code>. How to get the date in <code>yymmdd</code> format here?</p>