By default, powershell uses your regional settings. So when importing data from external files, a simple get-date or typecast to [DateTime] does not always give the correct value.
With the template below, you can interpret any format.
PS> $timeinfo = '12 07 2012 18 02' PS> $template = 'HH mm yyyy dd MM' PS> [DateTime]::ParseExact($timeinfo, $template, $null) Samstag, 18. Februar 2012 12:07:00
Values can be:
d Day of month 1-31 dd Day of month 01-31 ddd Day of month as abbreviated weekday name dddd Weekday name h Hour from 1-12 H Hour from 1-24 hh Hour from 01-12 HH Hour from 01-24 m Minute from 0-59 mm Minute from 00-59 M Month from 1-12 MM Month from 01-12 MMM Abbreviated Month Name MMMM Month name s Seconds from 1-60 ss Seconds from 01-60 t A or P (for AM or PM) tt AM or PM yy Year as 2-digit yyyy Year as 4-digit z Timezone as one digit zz Timezone as 2-digit zzz Timezone