Official Content

Stores the current date.

Data Type: 


Objects:  TransactionProcedure, Data ProviderWeb PanelPanel object


It's a standard 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 Procedure 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 Procedure header, it’s evaluated whenever the header is printed (once per page). It is equivalent to use Sysdate and Today.


Consider the Invoice Transaction:


Transaction Rules:

InvoiceDate = &Today if Insert;

The variable &Today is evaluated at the beginning of the Transaction, so the date assigned to the attribute corresponds to that day.

Using the Today function:

InvoiceDate = &Today if Insert;

The date corresponds to the moment the rule is evaluated.

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

See Also

Standard Variables List
Sysdate function
Systime function

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant