Previous Topic

Next Topic

Book Contents

Book Index

Using Date Expressions

Dates can be used in variable expressions and can be calculated using math operators and date units. It is important to understand the way date expressions and date keywords are calculated. A date expression is evaluated at the time the job executes.The current time on the executing server is used to expand the expression into a new date which may be used as a variable value or as input into the job commands or message text using the preprocessor syntax.

If you are unsure if the date expression will evaluate to the correct date, it is recommended that the expression be pre-evaluated using the current time or a future time. This is done by entering the expression in the Variable Expression dialog. See Evaluating Projected Date Values.

The following Date Keywords may be used on their own or in combination with Date Units and math operators. The addition (+) and Subtraction (-) operator are the only relevant operators since other operators used on dates gives unpredictable results.

For a comprehensive description of Date Expressions see Formatting Date Strings in EnterpriseSCHEDULE.

Date Keywords

Expression

Alternate

Description

BOY

BEGINNING_OF_YEAR

First day of the year

EOY

END_OF_YEAR

Last day of the year.

BOM

BEGINNING_OF_MONTH

First day of the month

EOM

END_OF_MONTH

Last day of the month

BOM

BEGINNING_OF_MONTH

First day of the month

MONDAY - SUNDAY

 

Days of the week.

MONDAY_THIS_WEEK -SUNDAY_THIS_WEEK

 

The "THIS_WEEK" word means the day of the current week.

TODAY

 

Today's date.

TOMORROW

 

Tomorrow's date.

YESTERDAY

 

Yesterday's date.

NOW

 

The current date and time.

Date Units

Expression

Alternate

Keywords

DAY

DAYS

A day. A 24 hour period.

HOUR

HOURS

An hour (60 minutes).

SECOND

SECONDS

A second.

YEAR

YEARS

A year.

MONTH

MONTHS

A month

WEEK

WEEKS

A week.

In This Section

Rules for Date Expressions

Date String Formats

Date Expression Examples

See Also

Variable Expressions

Creating a Variable Expression

Evaluating Projected Date Values

Variable Expression Basic Structure

Formatting variables

Using Strings Expressions in Variables