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

PowerTip: Use PowerShell to Show How Many Days Until the End of the Year

$
0
0

Summary: Learn how to use the New-TimeSpan cmdlet to see the number of days until the end of the year.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see the number of days until the end of the year?

                       Hey, Scripting Guy! Answer Use the New-TimeSpan cmdlet. Use Get-Date for the start and the day you wish for the endThe following shows this technique by using a U.S. English cultural setting.

                                             New-TimeSpan -Start (get-date) -End 12/31/2012

 


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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