Reputation: 5887
How can I convert the Date 20131213113850.0Z to a date object? Is there a build in command to convert for the get-date commandlet?
Thanks in advance!
Upvotes: 3
Views: 520
Reputation: 201602
I'm guessing a bit on the interpretation of the digit to the right of the decimal but does this get you there:
[DateTime]::ParseExact('20131213113850.0Z', 'yyyyMMddhhmmss.fK', $null)
The K
specifier will convert the time to the local time zone. Not sure if that is what you want or not.
Upvotes: 7