access_time 4 years ago languageEnglish

Calculate Time Difference between Dates in PowerShell

visibility 21,289 comment 0
PowerShell provides a number of cmdlets to retrieve current date time and to create time span object. $current = Get-Date $end= Get-Date $diff= New-TimeSpan -Start $current -End $end Write-Output "Time difference is: $diff" $current = [System.DateTime]::Now $end= ...
info Last modified by Raymond 4 years ago
thumb_up 1

comment Comments

No comments yet.

Forum discussions for column Scripting.

Follow Kontext

Get our latest updates on LinkedIn.

Want to contribute on Kontext to help others?

Learn more