Calculates the days between two dates

Hi,

In my app I have an "Event" collection. Each event have a "startDate" and a "endDate".

I would like to calculate and show in a text field:

1) how many days between "today" and the "startDate" (the event will start in xx days)

2) how many days the event will last (endDate - startDate)

How can I do?

Thank you

3
5 replies