title: Need assistance padding numerical month and day with leading 0
body: <p>I am working within a batch file and need to pad a single digit with a leading 0 if under 10.  I have the values in environmental variables.  They are month and day, I need to pad to match file structure I am working against.  I am using vbscript to return a date that comes back in the following format "7/16/2009".  Need it to look like "07/16/2009" and most inportantly need each item in separate EVs.</p>
  
  <p>VBscript:</p>
  
  <pre><code>WScript.Echo DateAdd("d", Date, -36)
  </code></pre>
  
  <p>Batch:</p>
  
  <pre><code>for /F "tokens=1-3 delims=/" %%x in ('cscript //nologo get36thday.vbs') do (
     SET YYYY=%%z
     SET MM=%%x
     SET DD=%%y)
  </code></pre>