How to make a sort toggle?

Hi, im make an app for my college project, i want to add a sort toggle for my image+listview. The tag for the database is the date. Can anyone show blocks on how to do this? Thanks in advance.
image

image
This is how the data is being saved


Changed the tag for the tinydb. made a small mistake. but still not sure about the sort

So you want A Date Range filter or Specific Date

date range filter actually, like to toggle the latest incident or oldest incident

Use this Extension to compare the days between the date ranges and then with the date of the item & the lowest date In the date range and if the no of days between the range is more than or equal to the no. of days between the lower date and item date then it falls under the range

1 Like

hmm i was planning to add this as a function later on but you gave me ahead of time. tnx for that. Now i can add sort plus how long this event been registered. nice

Once i have completed the block il share here