Code to get the current date and time.


/ Published in: DOS Batch
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.