Hi forum, this is my first post here. I'm a newbie.
I am having a hard time working with dates. Specifically, when it comes to saving and loading dates from TinyDB.
This is the app I am trying to create (or part of it rather, I have tried to keep it to the core issues):
- A date (OldDate) is displayed in a label and saved to TinyDB (initally, that date is the current date).
- There is also a date picker to change that date.
- When it is changed, the date shown in the label is updated and the new date (NewDate) is saved to TinyDB.
- The app calculates the difference in days between the old and the new date and saves that as a variable (DifferenceInDays).
- When the date is changed again, that NewDate becomes OldDate.
- The app calculates the difference in days and updates the DifferenceInDays variable.