DateToStr (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example uses a label and a button on a form. When the user clicks the button, the current date is displayed in the caption of the label.

Code

procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Caption := 'Today is  ' + SysUtils.DateToStr(Date);
end;

Uses