Skip to content

Instantly share code, notes, and snippets.

@jackinf
Created January 25, 2014 14:20
Show Gist options
  • Save jackinf/8617097 to your computer and use it in GitHub Desktop.
Save jackinf/8617097 to your computer and use it in GitHub Desktop.
Date Time batch
@echo off
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
echo %mydate%_%mytime%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment