You are here: Job and Form Set Rules Reference > JDT Rules Reference > GetRunDate

GetRunDate

Use this form set level rule when there is no value in the transaction extract lines that can be used as the run date. This rule gets the current date and treats it as the run date. It then reformats the date based on the format you specify in the format mask.

The rule assumes the GVM variable RunDate is the name of the variable where the date is stored. The RunDate variable is created if it does not exist. GVM variables are automatically created from the fields defined in your TRNDFDFL.DFD file, or by using the rule that explicitly creates GVM variables. If you omit the variable from being created in one of these methods, this rule creates it for you.

Syntax

;GetRunDate;;;

The parameters you can include are the various date formats supported by FmtDate rule. The default format is D4 (YYYYMMDD).

On success, msgSUCCESS is returned. If the system encounters a fatal error, msgFAIL is returned.

Format Masks

There are two types of format masks, pre-defined types 1-9 and A-Q and user-defined format arguments. If the pre-defined formats meet your needs, use them, otherwise, create a user-defined format. For information on using pre-defined format types, see Using Pre-defined Date Formats.

User-defined format arguments consist of one or more codes, each preceded by a percent sign (%). For more information on user-defined format masks, see Setting Up Format Arguments.

There is no limit to the length of the mask you create.

Example

Here are some examples:

;GetRunDate;;J;

If the system date is 20090217, the date format returned will be 17 February, 2009.

;GetRunDate;;;

If the system date is 20090217, the date format returned will be 20090217.

;GetRunDate;;;

If the system date is 2-17-2009, the date format returned will be 20090217.

;GetRunDate;;J;

If the system date is 2-17-2009, the date format returned will be 17 February, 2009.

See also

     
FmtDate