function AM_PM(Zeit: TTime): string;
var nk: double;
begin
nk := Frac(Zeit);
if nk = 0.5 then Result := 'Mittag' else
if nk < 0.5 then Result := 'Vormittag' else
Result := 'Nachmittag';
end;
// Beispielaufruf
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(AM_PM(StrToTime('3:00 PM')));
end;