Answer the question
In order to leave comments, you need to log in
Bat script - subtracting a month, what am I doing wrong?
set dd=%DATE:~0,2%
set mm=%DATE:~3,2%
set yyyy=%DATE:~6,4%
echo %mm%
IF %mm:~0,1% EQU 0(SET mm=%mm:~1,1% )
set /a mm=%mm%-1
echo %mm%
pause
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question