|
Time span Help I'm trying to find the amount of time between spend between june 02 till date. I'm getting different results if I use timespan and when I use Subtract method.
Comment would clarify concept behind it.
PS E:\cmdlets> New-TimeSpan (get-date -day 02 -month 06 -year 2005)
Days : 631
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 0
Ticks : 545184000000000
TotalDays : 631
TotalHours : 15144
TotalMinutes : 908640
TotalSeconds : 54518400
TotalMilliseconds : 54518400000
--------------------------------------------------------------------------------
$M=get-date -Year 2005 -Month 06 -Day 02
$T=get-date
$T.subtract($M)
PS E:\cmdlets> $T.Subtract($M)
Days : 630
Hours : 23
Minutes : 55
Seconds : 7
Milliseconds : 375
Ticks : 545181073750000
TotalDays : 630.996613136574
TotalHours : 15143.9187152778
TotalMinutes : 908635.122916667
TotalSeconds : 54518107.375
TotalMilliseconds : 54518107375 |