this is what it does
Simba Code:
{*******************************************************************************
function TheTime : string;
By: RsN (fixed by Ron)
Description: Returns current time as a string
*******************************************************************************}
function TheTime: string;
var
Hour, Mins, Sec, MSec: Word;
PAM: string;
begin
DecodeTime(Now, Hour, Mins, Sec, MSec);
PAM := 'AM';
if (Hour > 12) then
begin
Hour := Hour - 12;
PAM := 'PM';
end else if (Hour = 12) then
PAM := 'PM'
else if (Hour = 0) then
Hour := 12;
Result := (Padz(IntToStr(Hour), 2) + ':' + Padz(IntToStr(Mins), 2) + ':' + Padz(IntToStr(Sec), 2) + ' ' + PAM);
end;