开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜