yosoysupercholo

programa time y date

May 12th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.35 KB | None | 0 0
  1. @rem Original source: www.computerhope.com/issues/ch000987.htm
  2. @rem Purpose: echo in Command Prompt the date and time in the following format:
  3. @rem YYYYmmDD_hhMMss
  4.  
  5. @echo off
  6.  
  7. for /f "tokens=1-4 delims=/ " %%d in ("%date%") do set dateNow=%%e%%f%%g
  8. for /f "tokens=1-3 delims=:." %%d in ("%time%") do set timeNow=%%d%%e%%f
  9.  
  10. echo %dateNow%_%timeNow%
  11. pause
Advertisement
Add Comment
Please, Sign In to add comment