| 1. |
Solve : Set command? |
|
Answer» how do u do math using the set command? thnx Dusty it worked. GOOD, but be aware that if the hour in %Time% is less than the number of hours to be deducted you must use base 24 i.e. add 24 to the hour in %time% before deducting. e.g. if the current hour is 11 and you deduct 12 then you will get -1 whereas you really wanted 23 but 11+24-12 is 23. Similarly when manipulating MINUTES and seconds base 60 must be used. However, another problem(?) is that when SET/A encounters a number beginning with 0 (zero) it treats it as Octal (base eight). So if you try to do arithmetic calculations using SET/A on 08 or 09 (zeroeight or zeronine) the number is invalid in base 8 so the script will fail. My solution is to always remove the leading zero from numbers less than 10 (when dealing with two-digit numbers). Good luck & thanks for coming back with your success story. |
|