PowerShell Pointers
Tidbits on managing Windows Administration using PowerShell.
Showing posts with label
New-TimeSpan
.
Show all posts
Showing posts with label
New-TimeSpan
.
Show all posts
Saturday, April 21, 2018
Calculate the Difference Between Dates with PowerShell
With PowerShell, it's easy to calculate the difference between dates:
$StartDate = Get-Date
$EndDate = [datetime]"10/31/2018"
New-TimeSpan -Start $StartDate -End $EndDate
Thus, we can see that it's over 192 days until the next Halloween.
Older Posts
Home
Subscribe to:
Posts (Atom)