Posted By

mwt on 03/01/09


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Code to get the current date and time.

 / Published in: DOS Batch

  1. FOR /F "tokens=1-6 delims=/ " %%i in ('date/t') do set currentdate=%%i-%%j-%%k-%%l
  2. FOR /F "tokens=1-6 delims=: " %%i in ('time/t') do set currenttime=%%i-%%j-%%k

Report this snippet  

You need to login to post a comment.