Variable ora (time) with blank
The following assignment:
set ora=%开发者_高级运维time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
returns the value " 9194234" when the time is 9.19.42,34.
How can be squeezed the value or better to have the value "09194234"?
This should work
set ora=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
set ora=%ora: =0%
It replaces spaces with 0
精彩评论