Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

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 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>