Medication Reminder (again)

I know that I have to do it in TinyDB I wanted to know the blocks I had to use...

Use the TinyDB.StoreValue method to store the datetime converted in millis

https://community.appinventor.mit.edu/t/guide-how-to-use-the-clock/21742/58

Taifun

Okay, about the datetime conversion in millis... Should I send a printscreen of the blocks I have soo far so you can tell me the best way to do it? I would love if you sent a printscreen of the blocks needed to do the conversion since I'm not quite finding them.

If you need help with these, this sounds like a good idea... else obviously noone knows what you are doing

Taifun


Here are the blocks I have soo far (sorry that some of the names are in portuguese) soo my problem is the following: My save medication button currently does nothing because I don't know how to convert the datatime into millis and save that value in the TinyDB, also the button after saving the data it had to activate the clock to remind the user at the specified time...



I also made this app that translated the timepicker date, datepicker and the current time into millis and puts into the labels but I don't know how to apply it into my project.

I just need to know one thing for now:
I want that: I press the "Save" button - > It converts the timepicker date into Millis -> It saves that value into TinyDB - > And then activates the clock1 to warn the user at that time...

Can you help me out with the blocks?

Now I tried something:


Is this correct? And now how do I activate the clock1 to send the "notification" to the user at that time?

Great
To get a better understanding of how to work with date and time, do this tutorial

And learn how to use Do it

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Then use the FormatDateTime method from the Clock component and show us a Do it result of that instant you just stored in TinyDB and compare the result with what you get after using Clock.Now
See also chapter 2.2.6 of the tutorial

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Why is my 'do it' option grey? I can't select it.

You need to connect by Companion or emulator.

that is a problem because I only test my app by building it.

but didn't you told me I had to convert the timedate into millis? Also, where do I put those blocks you just sent?

Yes, because you want to store it in TinyDB
However first to have to

Therefore read again my previous answer and

Taifun

Understood but I still don't quite understood how to make 'Do it' work...
Also, sorry for all the questions but wouldn't the instant that I stored be different from the one I get on those blocks (since the clock will give the instant moment and the one I store is introduced on the timepicker by the user)?

Install the companion app and use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Is it this? I did the do it of the blocks you sent at 03:01 PM and the hours i introduced in the time picker was 03:03 PM...

Ok, you made some progress... very good...

Now compare the millis of the 2 instants or the FormatDateTime of the 2 instants
You will find out, that the date part of the timepicker instant is missing... to be able to compare the 2 instants, you have to add the date therefore

The timepicker gives you only an instant of time, but not of datetime

Taifun

Soo... What do I have to do exactly?