Official Content

Stores the current date.

Data Type: 
Date

Scope

Objects:  TransactionProcedure, Data ProviderWeb PanelPanel object

Description

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.

Samples

Consider the Invoice Transaction:

Invoice
{
  InvoiceId*
  InvoiceDate
  ....
  InvoiceAmount
}

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: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant