Hello!
I'm using the following code to convert HH:MM:SS to seconds:
procedure TForm1.DateTimePicker1Change(Sender: TObject);
begin
Label1.Caption := 'Seconds: '+ IntToStr(Trunc(Frac(DateTimePicker1.Time)*3600*24));
end;
The example project attached. When I increase or decrease seconds in DateTimePicker, values in Label do not always change accordingly. Most amazing is that sometimes this work, sometimes not. I even managed to make two identical DateTimePicker controls in one form, one working fine, while another not. Seems this depends upon initial Time value set to DateTimePicker at design time. But after full rebuild of a project this effect disappear, both controls have problems.
Is it my mistake or what?