By using this site, you acknowledge that you have read and understand our Cookie policy, Privacy policy and Terms .
access_time 7 months ago comment 0 languageEnglish

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.

Code snippet

$current = Get-Date
$end= Get-Date
$diff= New-TimeSpan -Start $current -End $end
Write-Output "Time difference is: $diff"
info Last modified by Raymond at 7 months ago

Please log in or register to comment. account_circle Log in person_add Register
comment Comments (0)
No comments yet.
account_circle Raymond

Code snippets for various programming languages/frameworks.

open_in_new View

local_offer Tags


info License/Terms