How to calculate total days automatically based on start date and end date?

1
How to calculate total days automatically based on start date and end date? start date: 13-04-2023 end date: 14-04-2023 Total days: 1( How to calculate this total days automatically.)
asked
1 answers
0

You can add a calculated attribute to the entity which gets its value from a MF. In the MF in the end event you can add the below login

if($Entity/start != empty and $Entity/end != empty) then
 round(daysBetween($Entity/start, $Entity/end))
else
 0

Or you can have any other MF which return you this.

answered