Dynamic date and time values

Use dynamic date and time values for your step properties to generate them at runtime. For example, you can define the current date as an identifier for a message:

  • The base date comes from the local system time and is expressed in ISO 8601 format.

  • Define date and time values using one of the step properties: Insert, Verify, or Trigger.

Use current date and time values

The dynamic expressions DATE and TIME create values based on the actual date and time. For example, use these expressions to create timestamps for tracking purposes.

The examples in the table use January 13, 2022, and 2:18 PM (14:18:00) as base values:

Expression

Description

Example

{DATE}

Full date

2022-01-13

{TIME}

Current date and time

2022-01-13T14:18:00

Calculate dates from a base date

You can calculate dynamic date and time values by defining a base date along with offsets using the syntax {<EXPRESSION>[<Base date>][<Offset>][<Format>]}.

Parameter

Description

Base date

Specify a date value. If you leave the value empty, API simulation uses the current date as the base date. You can also use buffer values as the base date.

Offset

Define what to add or subtract from the base date. Offsets consist of a signed integer and a unit. These are the possible values:

  • d: days

  • M: month

  • y: years

  • h: hours

  • m: minutes

  • s: seconds

Format

Define the date format if the date format of the test object differs from the ISO 8601 format. The default value is yyyy-MM-dd.

To apply the standard behavior to one of the parameters, leave the parameter value empty []. For instance, {DATE} and {DATE[][][]} have the same meaning. API simulation uses the current date without deviations.