Parsing a date time from an xml document with timezone abbreviations (e.g. CET )

rajrana007

New Member
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: \[code\]XElement element = ...var date = (DateTime)element;\[/code\]The date is in the following format:\[code\]01/28/2009 02:31:54 CET\[/code\]I already tried to parse the date using \[code\]TryParse\[/code\] 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?
 
Back
Top