Dos conver value to number

August 25, 2011 at 07:55:42
Specs: Windows XP
Hi,
I have to convert the value '08 '(current month) in number.
example:

rem choice /T 30 /D y
SET DSIST=%DATE%-10
SET NDATA=%DSIST:~6,4%%DSIST:~3,2%%DSIST:~0,2%
echo %NDATA%
SET ANNO=%DSIST:~6,4%
SET /A GDATA=%DSIST:~3,2%-1

The value %DSIST:~3,2%-1 returns a decimal conversion error

I want to convert '08 ' ( values month - number %DSIST:~3,2%-1) in numeric 8 .

Is possible?


See More: Dos conver value to number

Report •

#1
August 26, 2011 at 20:20:09
What are you trying to achieve?

Test this:

SET DSIST=%DATE%-10
echo %DSIST%

Is the result what you want or are you trying to deduct 10 from %DATE%?


Please come back & tell us if your problem is resolved.


Report •
Related Solutions


Ask Question