Skip to content

Today ​

The Today function returns the current date as a TDateTime data type.

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

Declaration: Function Today: TDateTime;

A example showing the function used along with FormatDateTime.

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

For additional information, please see DateTime (TDateTime).

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