The Date function returns the current local system date as a TDateTime data type.

The value does not include time, which is set to 00:00:00.

Declaration: Function Date : TDateTime;

A example showing the function used along with FormatDateTime.

procedure ScriptEvent (var Value : variant);
var myvariable : TDateTime;
begin
//Date function returns the current date without time
myvariable := Date;
LogInfo('The date is ' +FormatDateTime('dd/mm/yyyy', myvariable));
end;

For additional information, please see DateTime (TDateTime).

This Date function performs the same function as Today, and also performs a similar function as DateOf.