DateTimeToStr (Delphi)
Description
This example uses a label and a button on a form. When the user clicks the button, the current date and time are converted to a string and displayed as the caption of the label.
Code
procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption := SysUtils.DateTimeToStr(Now);
end;
Uses
- System.SysUtils.DateTimeToStr ( fr | de | ja )
- System.SysUtils.Now ( fr | de | ja )