G
Guest
I am trying to use a variable to set the beginning of a substring in a set
command:
set mon=%mon:~ %dtenum%,3%
where dtenum is itself an environment variable. as in the following:
set dteStr=%date:~4,2%
set /A dtenum=( %dteStr% - 1) * 3
set mon=JanFebMarAprMayJunJulAugSepOctNovDec
set mon=%mon:~ dtenum,3%
command:
set mon=%mon:~ %dtenum%,3%
where dtenum is itself an environment variable. as in the following:
set dteStr=%date:~4,2%
set /A dtenum=( %dteStr% - 1) * 3
set mon=JanFebMarAprMayJunJulAugSepOctNovDec
set mon=%mon:~ dtenum,3%