Skip to content

Instantly share code, notes, and snippets.

@MarkZhangTW
Last active August 21, 2020 01:32
Show Gist options
  • Save MarkZhangTW/cd08430c29645d9f0f5f7909853c34d3 to your computer and use it in GitHub Desktop.
Save MarkZhangTW/cd08430c29645d9f0f5f7909853c34d3 to your computer and use it in GitHub Desktop.
FOR /F "tokens=1,2 delims=.+" %%a in ('wmic os get localdatetime ^| findstr "+"') DO set TIME_NOW=%%a%%b
SET TIME_NOW=%TIME_NOW:~0,17%
ECHO %TIME_NOW%
@MarkZhangTW
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment