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.