PowerTip: Use UNIX Date Formatting in PowerShell

Doctor Scripto

Dr Scripto

Summary:  Learn how to use UNIX date formatting in Windows PowerShell.

Hey, Scripting Guy! Question How can I use my prior knowledge of UNIX date formatting to specify dates in Windows PowerShell?

Hey, Scripting Guy! AnswerUse the Get-Date cmdlet and the –Uformat parameter. For example, to display a date in standard format for your current locale, use the “x” format specifier:

PS C:\> Get-Date -UFormat %x



Comments are closed. Login to edit/delete your existing comments