Reputation: 1383
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
Reputation: 68273
This should give you the DateTime formats for the machine's current culture:
[cultureinfo]::CurrentCulture.DateTimeFormat
Upvotes: 2