I rarely parse xml files and when I try to use the features integrated in Linq2Xml. However today I stumbled upon a date format I am not able to cast via:
XElement element = ...
var date = (DateTime)element;
The date is in the following format:
01/28/2009 02:31:54 CET
I already tried to parse the date using TryParse
in various combinations, cultures, but whatever format I try the datetime parser complains about the space at position 20. Is there a way to parse this date without splitting the string or doing awkward things?