LoginSignup
1
0

More than 5 years have passed since last update.

Power Shell 指定期間の日数を求める。

Posted at
# 対象期間
$startDate = [DateTime]"2017/01/01"
$endDate = [DateTime]"2017/09/01"

$dist = New-TimeSpan $startDate $endDate

結果
ps1
Days : 243
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 0
Ticks : 209952000000000
TotalDays : 243
TotalHours : 5832
TotalMinutes : 349920
TotalSeconds : 20995200
TotalMilliseconds : 20995200000

1
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
1
0