Skip to content

Instantly share code, notes, and snippets.

@suchi
Created August 5, 2010 11:39
Show Gist options
  • Save suchi/509607 to your computer and use it in GitHub Desktop.
Save suchi/509607 to your computer and use it in GitHub Desktop.
YYYYMMDD.HHMMSSという環境変数を生成する
: YYYYMMDD.HHMMSSを作成する
: うしろ3桁をカット
set TIMEHHMMSS0=%TIME:~0,-3%
: ':'を削除
set TIMEHHMMSS=%TIMEHHMMSS0::=%
: '/'を削除
set DATEYYYYMMDD=%DATE:/=%
set DATETIME=%DATEYYYYMMDD%.%TIMEHHMMSS%
: ' 'を0にする
set DATETIME=%DATETIME: =0%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment