I need to parse ISO 8601 dates that does not contain a year and probably month component, such as:
--0412T102200Z
I am trying to use the following code which throws exception 'There must be at least a partial date with a year present in the input.':
DateTimeOffset.ParseExact("--0412T102200Z", "'--'MMdd'T'HHmmssZ",
CultureInfo.InvariantCulture, DateTimeStyles.None);
How do I parse such dates? Any chance to avoid replacing '--' with a year manually before parsing?