--> Displays time in 24 hour format delphi | Delphi Tips Trick

For Newbie

Tuesday 15 November 2011

Displays time in 24 hour format delphi

| Tuesday 15 November 2011
24 hours time

Because the format of the time in our country use format instead of 12h 24h (AM-PM), then there is a good idea to use this format.

Function declaration:
FWaktu24H function (dt: TDateTime): String;
begin
  Result: = formatDateTime ('hh: mm: ss', dt);
end;

Example of implementation:
TForm1.Timer1Timer procedure (Sender: TObject);
begin
   Label1.Caption: = FWaktu24H (Now);
end;

Related Posts

No comments: