Why I got an error when I want to get the string of a TimeSpan
with a custom format.
DateTime.Now.TimeOfDay.ToString("hh:mm"); // Error: Input string was not in a correct format.
DateTime.Now.TimeOfDay.ToString(@"hh\:mm\:ss")
Documentation
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