Skip to content

Instantly share code, notes, and snippets.

@rbwestmoreland
Created July 30, 2013 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbwestmoreland/6109070 to your computer and use it in GitHub Desktop.
Save rbwestmoreland/6109070 to your computer and use it in GitHub Desktop.
Batch file date time parsing
@echo off
set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%
set hour=%time:~0,2%
set minute=%time:~3,2%
set second=%time:~6,2%
set millisecond=%time:~9,2%
echo %year% %month% %day% %hour% %minute% %second% %millisecond%
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment