create an mobile application that will display "you are qualified to vote when enter the age 15 above and when enter the age 14 below it will display "you are too young to vote". using mit app inventor
How you want to get age ?
Get dob and calculate the difference between the current date with dob then from the result just use if then else block
You have to use a clock , manage the format in the right way for your goal. In the clock component you can find AddDuration(instant ,quantity ) to add the time (15) to the birthday date. If the new date is time now or less the guy is qualified to vote
Dob is date of birth?
Use a DatePicker to collect the DOB of the user. This will include the month, date and year the user is born.
Manipulate instants using the Clock component.
G.aia (1.9 KB)
By clicking on a block and selecting External Inputs, you can change the shape of a block which helps you to save space.
15 years in milliseconds is 473364000000.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.