Why does this code return false? This question/answer strongly implies that it should return true.
TimeSpan.TryParseExact("04:00:01", "hh:mm:ss", CultureInfo.CurrentCulture, out x);
Using InvariantCulture
also returns false and TimeSpan.ParseExact()
throws an invalid format exception. HH:mm:ss
is wrong, as per the above question.
How is 04:00:01
breaking the format for hh:mm:ss
?
Use @"hh\:mm\:ss"
for your format.
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