Hy!
The DateTime.toString() gives 12 hours more back as in the debugger written.
Do i need CultureInfo?
(in austria we are used to count from 0 – 24 for the hours)
thx
My Code:
DateTime dtime = new DateTime(1900, 1, 1, Convert.ToInt32(tim2.hour), Convert.ToInt32(tim2.minute), Convert.ToInt32(tim2.second));
label2.Text = dtime.ToString ("hh:mm:ss.F");
Debugger:
+ dtime {01.01.1900 00:05:48} System.DateTime
+ label2.Text "12:05:48" string
hhis a 12 hour format (i.e. 0:05 is 12:05 AM). It sounds like you want to useHHinstead, which is a 24 hour format:label2.Text = dtime.ToString ("HH:mm:ss.F");Relevant documentation for the formatters can be found here.