DateToStr (Delphi)
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
- System.SysUtils.DateToStr ( fr | de | ja )
- System.SysUtils.Date ( fr | de | ja )