You can use the function Frac():
var
Time: TTime;
...
Time := Frac(DateTimePicker1.DateTime);
Or you can use a function System.DateUtils.TimeOf()that is just an inline wrapper around Frac()with a more descriptive name:
uses
..., DateUtils;
var
Time: TTime;
...
Time := TimeOf(DateTimePicker1.DateTime);
source
share