Skip to content

The "Duration Math" Node ​

Performs a math using duration objects.

Duration Math

  • Result
  • Operation
  • A
  • B
  • B
  • Part

Inputs ​

  • Operation − The math operation to perform.
    • Add − Adds together two durations.
    • Subtract − Subtracts duration B from duration A.
    • Multiply − Multiplies duration A by a number (B). E.g. 3 seconds times 4 -> 12 seconds
    • Divide − Divides duration A by a number (B). E.g. 1 day divided by 3 -> 8h
    • Modulo − Performs a modulo operation using 1 of a given date-time part. It effectively "crops off" everything from that part upwards. E.g. "1 day, 2 hours, 3 minutes, and 4 seconds" modulo using "hour" -> "3 minutes, and 4 seconds"
    • Round − Rounds a duration to a given date-time part.
    • Floor − Rounds a duration down to a given date-time part. It effectively "crops off" everything below that part. E.g. "1 day, 2 hours, 3 minutes, and 4 seconds" floored using "hour" -> "1 day, and 2 hours"
    • Ceil − Rounds a duration up to a given date-time part.
  • A − Duration on the left side of the operation.
  • B − Duration, for Add and Subtract, or number, for Multiply and Divide, on the right side of the operation.
  • Part − Part to use for the operation. Applies only to Modulo, Round, Floor, and Ceil.

Outputs ​

  • Result − Result of the math operation.