title: Batch script date into variable
body: <pre><code>for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
  set Day=%%k
  set Month=%%j
  set Year=%%l
  set DATE=%%k/%%j/%%l)
  </code></pre>
  
  <p>I am try to get the date into the above variables in a batch script, but currently the date comes out as </p>
  
  <pre><code>2011/04/
  </code></pre>
  
  <p>Any suggestions on how to fix this?</p>