Learn about Windows PowerShell
Summary: Use Windows PowerShell to display date, time, and hour in 24-hour format.
How can I use Windows PowerShell to get the hour of the day in 24-hour format?
Use the Get-Date cmdlet and specify the “%H” pattern to the UFormat parameter (H is case sensitive):
get-date -UFormat "%H"
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS H:\> get-date -UFormat "%H"
@Scripto I am glad you like it. Yes, this technique is something that I use to check things like AM and PM.
Thanks!! Definitely will come in handy