0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PowerShellで現在日時をyyyyMMddHHmmss形式で取得

Posted at

やり方

$datetime_ = Get-Date -Format "yyyy年MM月dd日HH時mm分ss秒";
Write-Output $datetime_;

実行結果。
image.png

注意点

月のMMは大文字

小文字だと『分』。

時は24時間表記なら大文字

小文字だと12時間表記。

参考サイトさん

バージョン

Microsoft Windows [Version 10.0.19045.3570]
PSVersion 5.1.19041.3570

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?