For example, can I do
echo 3 + 5
and get 8
?
Is it possible to do calculations using the date?
You can use set /a
to calculate a mathematical expression:
set /a x=3+5
echo %x%
Edit: here's a one-liner:
@for /f usebackq %i in (`set /a 3 + 5`) do @echo %i