1.

Solve : for /f "tokens=1-2 delims=:,a,p " %%24 t?

Answer»

I am trying to create a FILE with the time appended as a stamp (filenamehhmm), however when I use the following code, the system returns a 12-HOUR clock time
(1:57p) instead of 24 hour (13:57). I was able to remove the p by adding "a" and "p" to the DELIMITERS

for /F "tokens=1-2 delims=:,a,p " %%a in ('TIME /T') do (
set hrmm=%%a%%b)

but I cannot get an "HHMM" format returned.

Any hints?

THANKS,

Rich



Discussion

No Comment Found