G
Guest
C:\Tmp>echo %date%
Fri 09/22/2006
C:\Tmp>set /a month = %date:~4,1%
0
C:\Tmp>set /a month = %date:~4,2%
Invalid number. Numeric constants are either decimal (17),
hexadecimal (0x11), or octal (021).
C:\Tmp>
In this code second “set†does not work, is there anyway I can get it work?
I am trying to get previous month number by using, C:\Tmp>set /a month =
%date:~4,2%-1
Fri 09/22/2006
C:\Tmp>set /a month = %date:~4,1%
0
C:\Tmp>set /a month = %date:~4,2%
Invalid number. Numeric constants are either decimal (17),
hexadecimal (0x11), or octal (021).
C:\Tmp>
In this code second “set†does not work, is there anyway I can get it work?
I am trying to get previous month number by using, C:\Tmp>set /a month =
%date:~4,2%-1