procedure TForm1.Button1Click(Sender: TObject); var hourtime : String; begin hourtime:=Formatdatetime('h',now()); if StrtoInt(hourtime)>12 then showmessage(formatdatetime('yyyy年M月d号',now())+'下午'+InttoStr(StrtoInt(hourtime)-12)+'时') else showmessage(formatdatetime('yyyy年M月d号',now())+'上午'+hourtime+'时') ; end;
procedure TForm1.Button1Click(Sender: TObject); var hourtime : String; begin hourtime:=Formatdatetime('h',now()); if StrtoInt(hourtime)>12 then showmessage(formatdatetime('yyyy年M月d号',now())+'下午'+InttoStr(StrtoInt(hourtime)-12)+'时') else showmessage(formatdatetime('yyyy年M月d号',now())+'上午'+hourtime+'时') ; end;
var
hourtime : String;
begin
hourtime:=Formatdatetime('h',now());
if StrtoInt(hourtime)>12 then
showmessage(formatdatetime('yyyy年M月d号',now())+'下午'+InttoStr(StrtoInt(hourtime)-12)+'时')
else
showmessage(formatdatetime('yyyy年M月d号',now())+'上午'+hourtime+'时') ;
end;
var
hourtime : String;
begin
hourtime:=Formatdatetime('h',now());
if StrtoInt(hourtime)>12 then
showmessage(formatdatetime('yyyy年M月d号',now())+'下午'+InttoStr(StrtoInt(hourtime)-12)+'时')
else
showmessage(formatdatetime('yyyy年M月d号',now())+'上午'+hourtime+'时') ;
end;