Posted By

goo on 12/09/08


Tagged

bat fecha


Versions (?)

BATCH - Formato de la FECHA


 / Published in: Bash
 

URL: http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/

  1. FOR /F "TOKENS=1,2 DELIMS=/ " %%A IN ('DATE /T') DO SET mm=%%B
  2. FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('DATE /T') DO SET dd=%%B
  3. FOR /F "TOKENS=3* DELIMS=/ " %%A IN ('DATE /T') DO SET yyyy=%%B
  4.  
  5. set /A dd=%dd%-3
  6.  
  7. set Pdate=%mm%/%dd%/%yyyy%
  8. echo %Pdate%

Report this snippet  

You need to login to post a comment.