Number of days between 2 dates

Hi everyone. I am new using App Inventor and I am having some troubles doing an app. I need to operate with the number of days between 2 dates that the user put them manually. I have two questions:

  1. Do I need to save each date in a new variable using DatePicker from userinterface? or can I call the each DatePicker directly to operate?
  2. What is the correct way to calculate the days.
    I am doing it in this way:
    image

    It is important to say that DateInicial and DateFinal are the DatePickers, but I do not know if this is the correct way to do it.
    Thanks a lot.
2 Likes

Welcome!

Here is an example. Follow the blocks in the link.

You can, if you like.

2 Likes

The Clock component is in the Designer's Sensors drawer.