- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2020-07-27T00:27:41+00:00","default:admin","admin")
#author("2021-12-02T07:02:51+00:00","default:admin","admin")
-[[PowerShellで日付を扱う:https://qiita.com/hidemaru/items/5c60adf45f746aa40dd1]]
-[[2個の日付の差の日数を計算する方法:https://bayashita.com/p/entry/show/244]]
*文字列からの変換 [#s94c20b5]
-[[[Powershell]文字列を日付に変換する:https://sevenb.jp/wordpress/ura/2015/08/06/powershell%E6%96%87%E5%AD%97%E5%88%97%E3%82%92%E6%97%A5%E4%BB%98%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%99%E3%82%8B/]]
-日付として認識できる文字列は、DateTime型にキャストすればOK
[DateTime]"2021/12/01"
-カスタム日付書式を指定したい場合は、[DateTime]::ParseExact()を使用
[DateTime]::ParseExact("20211201","yyyyMMdd", $null)
*文字列への変換 [#sf2821af]
- -Format "yyyyMMdd"
*Tips [#fd423f1d]
-今日の0時
(Get-Date).Date