Assuming that the ",00" is hundredths of seconds and the "-05" is the timezone, you can parse it like this:
string dateStr = "20110123T233356,00-05";
string format = @"yyyyMMdd\THHmmss\,ffzz";
DateTime result;
if (DateTime.TryParseExact(dateStr, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out result))
{
Console.WriteLine(result);
}
else
{
Console.WriteLine("Can't parse the date: " + dateStr);
}
However, that's a big assumption.
Note that you can also specify the format string without escaping the T
or the ,
as follows (but I escaped them to make it more obvious that they aren't format characters):
string format = "yyyyMMddTHHmmss,ffzz";