Sort table by using dropdown?

Is it possible to sort a table by using a dropdown?
F.ex If you have a dropdown that says, Today, This week, This month. Is it somehow possible to sort the table by using those values?

Hi,

To accomplish this, you can update the dates stored in the database by triggering a delayed action. After updating the dates, you can use a drop-down menu to show a label, giving customers the ability to select their preferred option. It is crucial to make sure that the database contains start and end dates for this process to function effectively.

The delayed action should be set to run in the background on the splash (home) screen to ensure that the dates are always up to date.