Paul
Paul

Reputation: 1383

powershell get current date format being used by system

How can I use powershell to get the current system date format for example if I was reading a log file using powershell I would like to know if 2012-03-01 is in yyyy-mm-dd or yyyy-dd-mm.

Upvotes: 2

Views: 2405

Answers (1)

mjolinor
mjolinor

Reputation: 68273

This should give you the DateTime formats for the machine's current culture:

[cultureinfo]::CurrentCulture.DateTimeFormat

Upvotes: 2

Related Questions