I have the following code:
var point = TimeSpan.ParseExact(input, "hh\\:mm\\:ss\\,fff", CultureInfo.InvariantCulture);
and my input format is:
00:00:15,680
It's quite easy task I know. But I always get the following error:
System.FormatException: 'String was not recognized as a valid TimeSpan.'
So what I do wrong ? Can you help me with my specific task ? Actually I've already tried so many formats but unfortunately noone is correct.
According to ParseExact definition, the syntax is:
input format, etc
The System.FormatException exception message is about the input parameter, the first parameter from the list that is in the function's prototype. I would double check the value of the input parameter from your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With