Can I compare the current date on my device to a one entered in a date picker

Can I know the gap between the current date and one that I have picked in a DatePicker, example, the current day is 14 and I picked 10 and it shows that 4 days have passed, can I do that?

You could adapt this using the datepicker.

Here I selected 10/01/2026 in the datepicker and clock1.now returns 14/01/2026

It works! Thank you so much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.