I need to know the number of days between today and the date of birth
You can use a clock. You can get the duration with the duration() block. The start will be the birth date, and the end will be the now() block. The images are down below.
Also, the birth date will have to be in date picker format.
Buy the number is seconds?
Okay, first of all, tell me the format of the date of birth. Will it be from a date picker?
the difference between today and yesterday should have been 1 day but it was 165920643
Sorry, I told you to use the wrong blocks. Sorry. You should check out the post below. It is pretty easy. I am so sorry for all this mess.
The duration is returned in milliseconds
See this Gallery app to do it all in blocks ...
http://ai2.appinventor.mit.edu/?galleryId=6104963528523776
You can also use the Clock's DurationToDays method:
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.