I'm having issues parsing a time span, i have a start and end time for a dataset and the step is formatted like this 0000-00-00.01:00:00
so in this case it's only an hour between. but it might be days etc so it has to keep some support.
The issue is that a line like this
const string TimeSpanFormat = @"yyyy-MM-dd\.hh\:mm\:ss";
TimeSpan.ParseExact(StepToConvert, TimeSpanFormat, CultureInfo.InvariantCulture)
or like this
DateTime.ParseExact(StepToConvert, TimeSpanFormat, CultureInfo.InvariantCulture).TimeOfDay
returns both the error
Additional information: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.
so I'm kind of at a loss, with the exception of making a helper class/structure.
works fine on times like 2013-01-01.00:00:00
for Datetime btw.
Any bright ideas in the community on this?