#author("2019-03-17T01:30:01+09:00","default:ryuichi","ryuichi")
* Get-Date [#g128606f]

** DateTimeオブジェクトの作成 [#g41b1f39]

 $dt = get-date "2019-03-17"
 $dt = get-date "2019-03-17 10:00:00"

** 日付を加算する(減算する) [#u28b0ecc]

 $today = Get-Date
 $tomorrow = $today.AddDays(1)

 Write-Host (Get-Date).AddDays(-7)

** 曜日を数値で取得する [#xc2e7241]

 $str = (Get-Date).DayOfWeek         # => Sunday
 $num = [Int] (Get-Date).DayOfWeek   # => 0

** 参考 [#t1d79260]
https://technet.microsoft.com/en-us/library/ff730960.aspx


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS