Daily ArchiveNovember 13, 2017

#powershell Get-Date v.s. [datetime] Format and System Locale II

Irrespective of the Windows system language and locale, a non-US datetime format text string imported from a file into PowerShell may still need to be formated with Get-Date or cast through [datetime] prior to use.

However, date/time operations may fail silently if the conversion or re-formatting did not succeed.