PowerTip: Use PowerShell to Display Time in 24-Hour Format

Doctor Scripto

Dr Scripto

Summary: Use Windows PowerShell to display the current time in 24-hour format.

Hey, Scripting Guy! Question  How can I use Windows PowerShell to display the current time in 24-hour format?

Hey, Scripting Guy! Answer  Use the Get-Date cmdlet and the –UFormat parameter with %R:

Get-Date -UFormat %R

0 comments

Leave a comment