1 2 3 4 5 6 |
@echo off for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set FECHA=%%a%%b%%c for /f "tokens=1-2 delims=: " %%a in ('time /t') do set HORA=%%a%%b echo %FECHA% echo %HORA% pause |
1 2 3 4 5 6 |
@echo off for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set FECHA=%%a%%b%%c for /f "tokens=1-2 delims=: " %%a in ('time /t') do set HORA=%%a%%b echo %FECHA% echo %HORA% pause |
Me ayudó bastante. Muchas gracias