开发者

Variable ora (time) with blank

开发者 https://www.devze.com 2023-01-20 22:46 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消