Today Variable

Official Content
This documentation is valid for:

Stores the current date.

Pre-defined GeneXus variable that stores the current (Today) date value. The format of the date issued by this variable depends on the language used by the application (language configuration parameter).

iSeries: This variable returns the start date of the JOB, not the SYSTEM DATE. This allows you to run a job with a date different from the current one and use this date in the program.

See also the Sysdate function if you want to use the actual SYSTEM DATE.

If &TODAY is used in a report header, it prints the job's date. The result could be different from the one obtained using the function Sysdate if the job's attributes are changed (the dates may be different). The value returned by Today function is the same as using &Today variable.

PC: If &Today is used in a Report header, it’s evaluated whenever the header is printed (once per page). It is equivalent to use Sysdate and Today.

Data Type: Date


An Orders transaction records the date of each newly inserted order.


OrderDate = &Today if Insert On AfterValidate;

The variable &Today is evaluated at the beginning of the transaction, so the date written in the attribute corresponds to that day.

Using the function Today:

OrderDate = Today() if Insert On AfterValidate;

The value of OrderDate corresponds to the moment the rule is evaluated.

If the program continues executing from one day to another, the values may be different.


Objects  Procedure object, Transaction object, Web Panel object

See Also

Built-in Variable List
Sysdate function
Systime function