KB-1386 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
    )
)

You can now use this expression rule in place of the original function.

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

Kindly note that Appian Technical Support provides the above SAIL code as-is without any express guarantee of functionality. Readers will need to test and adjust the code as necessary.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: June 2017

Related
Recommended