Adding a decimal place to express ms as seconds:
C] echo %ms:~0,-2%.%ms:~-2,2%
123.45
C] echo %m2:~0,-2%.%m2:~-2,2%
12.34
C] set m1=123
C] echo %m1:~0,-2%.%m1:~-2,2%
1.23
C] set m0=23
C] echo %m0:~0,-2%.%m0:~-2,2%
.23
C] set m=2
C] echo %m:~0,-2%.%m:~-2,2%
.2
C] set m=02
C] echo %m:~0,-2%.%m:~-2,2%
.02
To insert commas, not so simple:
C] set m=123456789C] echo %m%
123456789
C] echo %m:~-3,3%
789
C] echo %m:~-6,3%,%m:~-3,3%
456,789
C] echo %m:~-9,3%,%m:~-6,3%,%m:~-3,3%
123,456,789
C] echo %m:~-12,3%,%m:~-9,3%,%m:~-6,3%,%m:~-3,3%
123,123,456,789
More complex solutions at https://stackoverflow.com/questions/28700043/thousands-separator-of-an-integer-value
C] echo %m%
123456789
C] if %m% GTR 99999999 (set c=%m:~-9,3%,%m:~-6,3%,%m:~-3,3%)C] echo %c%
123,456,789
C] set n=12345
C] if %n% GTR 99999999 (set c=%n:~-9,3%,%n:~-6,3%,%n:~-3,3%) else ( if %n% GTR 9999 (set c=%n:~-6,3%,%n:~-3,3%) )
C] echo %c%
123,345 WRONG!!