Skip to content

steps_between

Syntax

steps_between(timestamp1, timestamp2)

Parameters

timestamp1
Expression that evaluates to a number of the form YYYYMMDDHH or YYYYMMDD.
timestamp2
Expression that evaluates to a number of the form YYYYMMDDHH or YYYYMMDD.

Returns

Returns the number of hours between the two timestamps.

If either argument represents an invalid timestamp, a run-time error will occur and the simulation will terminate.

Description

Returns the number of hours between the given timestamps.

The results are accurate for timestamps between the start_date and end_date defined for the model.

Timestamps outside the simulation period results in arbitrary large values. For example, if timestamp1 occurs prior to start_date or timestamp2 occurs after end_date, then the action may return a value such as 999999.

Examples

wait(steps_between(2020010100, 2021052813))

See Also