locked
adding numbers in windows batch RRS feed

  • Question

  • Hi,

    I would like to get a current year (2010) and a year after it (2011) in Windows Batch's script.

    %date:~0,4% works very good and returns 2010 as expected

    unfortunately
    %date:~0,4% + 1 returns 2010+1

    Is there a way to convert string(?) value of %date:~0,4% to a number and add 1 to it as a number?

    Regards,
    Alice
    tennis odds | basketball odds
    Tuesday, February 2, 2010 1:07 PM

All replies