-
-
Save NKid/4a139b27040899b37d64 to your computer and use it in GitHub Desktop.
Get Date Time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
FOR /f "tokens=1-3 delims=/ " %%a IN ('date /t') DO (SET date=%%a-%%b-%%c) | |
SET NowTime=%time: =0% | |
ECHO DATE → %date% | |
ECHO HOUR → %NowTime:~0,2% | |
ECHO MINUTE → %NowTime:~3,2% | |
ECHO SECOND → %NowTime:~6,2% | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment