You are currently reviewing an older revision of this page.

KB-XXXX Negative value returned for intervalds() function when passing inputs amounting to greater than 591 hours, 31 minutes, and 23 seconds

Symptoms

When executing the intervalds() function and passing hours, minutes, and seconds that total greater than 591 hours, 31 minutes, and 23 seconds, the time interval returns as a negative number.

Cause

This issue has been reported to the Appian product team. The reference number for this issue is AN-78778.

Action

  1. Create an expression rule under a different name than the original function.
  2. Create three rule inputs: hourminute, and second. The data type for all rule inputs should be Number (Integer).
  3. Paste the following definition in the expression rule:
quotient(
    ri!second + 60 * ri!minute + 3600 * ri!hour,
    2147483
) * intervalds(
    0,
    0,
   2147483
) + intervalds(
    0,
    0,
    mod(
        ri!second + 60 * ri!minute + 3600 * ri!hour,
        2147483
    )
)

Note: Similarly to the original intervalds() function, the value of each rule input must be non-null.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: June 2017