Calculate Difference/Duration between Two Timestamps in PowerShell
Raymond visibility 1,183 event 2019-11-18 access_time 2 years ago language English
This code snippet shows how to calculate time differences.
In PowerShell, you can use
New-TimeSpan cmdlets to calculate the time differences between two dates/timestamps.
$current = Get-Date $end= Get-Date $diff= New-TimeSpan -Start $current -End $end Write-Output "Time difference is: $diff"
info Last modified by Raymond 2 years ago copyright This page is subject to Site terms.
No comments yet.