HELP: Trouble in storing Instant in TinyDB

Why does this give me error?
sample.aia (2.1 KB)

You currently cannot store an instant directly to tinydb. Convert instant to string output and save that instead.

Hi Kaustubh

Your code is logical. Looks as though the DatePicker Instant is incompatible with the Clock Blocks at first glance but Tim has found that you cannot store an instance in TinyDb? If you store it as a string, you won't be able to use it later as an instance.....

Does Anke's suggestion fix it for you? If it does, all good. Either way let us know.

Ok, I'll try and let you all know.

I tried @Anke's suggestion but still getting the same error, just now it says "GetMillis cannot accept the argument....."

Edit: I forgot to change one block. Ok trying again.

Tricky.

So what do you want your App to do? It looks like you are storing an instance so that you can later recall a date?

1 Like

Basically saving the expiry dates of grocery and alerting the user when does the grocery expires. This was a test application to see if my code works.

Check this: sample2.aia (2.2 KB)

Clear TinyDB and reload ...

1 Like

Done! Working now!
I actually misread the blocks that @Anke posted initially.
Thank You everyone for help :slightly_smiling_face:

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