For Newbie

Tuesday, 15 November 2011

Displays time in 24 hour format delphi

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;

Share on Facebook
Share on Twitter
Share on Google+

Related : Displays time in 24 hour format delphi