Language Elements and Expressions > Expressions > Time Expressions

Time Expressions

A time expression is a numeric expression followed optionally by a time unit (WK, DAY, HR, MIN, SEC) which defines a duration. If no time unit is specified, the default time unit specified in the General Information dialog box is assumed. ProModel knows whether an expression is a time expression based on the context. Time expressions are not valid within a function call. For example, E(10 sec) is invalid, while E(10) sec is valid. If a negative value is used for a time expression, it is automatically converted to zero.

Syntax for time expressions

<numeric expression>{<time units>}

Examples

2 hrE(10) minVar1+40.25 min

Note that time units cannot be mixed (e.g., 3 min 21 sec), unless you use colon notation.

Colon Notation for Time Values

Colon notation allows for more complex time expressions. You may use colon notation in the following manner to express time values.

Colon notation

<hours expression>:<minutes expression>:<seconds expression>

Colon notated time expressions evaluate from right to left as illustrated in the following examples:

Example

Meaning

:05

5 seconds

5:00: or 5::

5 hours

5:00 or 5:

5 minutes

2:40:

2 hours and 40 minutes

15:02:05

15 hours, 2 minutes and 5 seconds

3:25

3 minutes and 25 seconds

Attr1::Var2

Attr1 hours and Var2 seconds


© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com