I receive the datetime string below from a web service and try to transform it into a UTC datetime object but an exception is thrown.
try
{
string ReceivedDateTimeString = "2012-10-09T07:42:13.409191Z";
DateTime TransformedReceivedDateTimeString = DateTime.ParseExact(ReceivedDateTimeString, "o", CultureInfo.InvariantCulture, DateTimeStyles.None);
}
catch (Exception e)
}
Why is an exception thrown? Is there something wrong with the format of the string or with my transformation?
What about this: