views:

21

answers:

1

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"?

+1  A: 

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

Andy Morris
Yes, it's perfect, thanks
aemme
Its considered polite to mark the answer as accepted answer and as useful, then I get some stackOverflow goody points and my life feel slightly less pointless.
Andy Morris
Done, the power is in the little things
aemme