After you have seen this HowTo video and read this article you will know how to subtract date properties with number expressions. For example, to count the number of days between a start and an end date.
- Create two properties with the kind as 'Date'. In this HowTo video we've used start date and end date.
- Create an extra number expression property to subtract the two date properties with.
- Complete the expression and insert the two date properties as variables in the expression definition.
- Add the number expression property to the form and check the expression outcome.
- A number expression property always returns a whole (number) value. To have a number with decimal value, you have to change the expression property type to 'Number with decimal'. Change the property type.
- Complete the settings of the number with decimal property type.
- Check the expression outcome.
So remember, subtracting dates will return a numeric value of the smallest variable of the dates, or simply put: Subtracting date properties will return the answer in days whereas subtracting date time properties will return the answer in seconds.