unit DateToStr;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: DateToStr
// Routine: SysUtils.DateToStr
// Routine: SysUtils.Date

// BeginCode
{
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:
} 
procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Caption := 'Today is  ' + SysUtils.DateToStr(Date);
end;
// EndCode
// EndExample: DateToStr
end.
