How to return a range of days in the kodular

in a part of my application the user needs to select two dates in the datepicker
and I need to save the number of days between these two dates

but the months do not have equal days how do I return the interval between different months?

That is done automatically if you use the right blocks for it.
Use the DURATION TO DAYS block. Attach a DURATION (start,end) to it with the start and end dates.

Also, your procedure assumes that both months are in the same year. Just use the built in blocks and enjoy a nice day! :grin:

thaaannnkss
but I only had one problem: the duration does not accept dates apparently what do I do?

convert the dates into an instant of time, see the documentation of the Clock component
Taifun

sure !
thanks :slight_smile:

Well, if it doesn’t accept dates, then we are in trouble because that’s the only purpose of it! :rofl:
Just kidding!

Learn all about instants, durations, milliseconds, etc. It sounds complicated but it will save you a lot of time when working with dates in Kodular/App Inventor.

3 Likes

or give a try to extension by @vknow360

1 Like