title: Math
description: This extension adds custom actions to your care flow for simple mathematical operations.
Math
This extension adds custom actions to your care flow for simple mathematical operations.
Custom Actions
Sum
Calculate the sum of two or more addends.
Subtract
Calculate the difference between two numbers.
Multiply
Multiply a series of numbers to get a final product.
Divide
Divide two numbers.
Generate random number
Generates a random (whole) number that falls between the ranges of two numbers [min, max].
Calculate date difference
Calculate the difference between two dates where "date left" is the minuend and "date right" the subtrahend.
You can choose the unit in which you would like to see the difference expressed:
- Seconds: get the number of seconds between the given dates. Fractional seconds are truncated towards zero.
- Minutes: get the signed number of full (rounded towards 0) minutes between the given dates. Fractional minutes are truncated towards zero.
- Hours: get the number of hours between the given dates. Fractional hours are truncated towards zero.
- Days: get the number of full day periods between two dates. Fractional days are truncated towards zero.
- Weeks: get the number of full weeks between two dates. Fractional weeks are truncated towards zero.
- Months: get the number of full months between the given dates. Fractional months are truncated towards zero.
- Years: get the number of full years between the given dates.