Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Find the Number of Seconds in Three Days

$
0
0

Summary: Use Windows PowerShell to easily find the number of seconds in three days.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find how many seconds are in three days without diving into a bunch of multiplication or division?

Hey, Scripting Guy! Answer Use the New-TimeSpan cmdlet to create a time span of three days, and select the TotalSeconds property:

PS C:\> (New-TimeSpan -Days 3).totalseconds

259200 


Viewing all articles
Browse latest Browse all 3333

Trending Articles