N
niju
Hi there
I am trying to get a single digit hour in 12-hour format with the
following code.
DateTime hr = DateTime.Now;
string hour = hr.ToString("h");
However, I get "Input string was not in a correct format" error. Please
help me to correct this problem.
Many Thanks
Niju
I am trying to get a single digit hour in 12-hour format with the
following code.
DateTime hr = DateTime.Now;
string hour = hr.ToString("h");
However, I get "Input string was not in a correct format" error. Please
help me to correct this problem.
Many Thanks
Niju