LoginSignup
0
0

More than 5 years have passed since last update.

環境変数に日時情報を取得する方法

Last updated at Posted at 2017-12-04

; 年月日
SET YYYYMMDD=%date%

; 西暦
SET YYYY=%YYYYMMDD:~0,4%

; 月
SET MM=%YYYYMMDD:~5,2%

; 日
SET DD=%YYYYMMDD:~8,2%

; 時刻
SET HHMISS=%time: =0%

; 時(24時間)
SET HH=%HHMISS:~0,2%

; 分
SET MI=%HHMISS:~3,2%

; 秒
SET SS=%HHMISS:~6,2%

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0