/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
FOR /F "TOKENS=1,2 DELIMS=/ " %%A IN ('DATE /T') DO SET mm=%%B FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('DATE /T') DO SET dd=%%B FOR /F "TOKENS=3* DELIMS=/ " %%A IN ('DATE /T') DO SET yyyy=%%B set /A dd=%dd%-3 set Pdate=%mm%/%dd%/%yyyy% echo %Pdate%
URL: http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/