I'm creating a new database for a customer, and want to select the oldest group of dates based on a variable that he enters through a tkinter gui. I'm using Sqlite and I can't seem to find an answer since the date is stored as text. Is there a way of comparing dates and selecting the oldest few based on a variable. I don't need to select 2 dates and the products in between I want to select 3 products to go out and the program automatically selects the oldest 3 products in the database Thank you. :)
For example If there are 5 products in the table:
- product one on january 1st.
- product two on january 10th.
- product three is january 3rd.
- product 4 is february 5th.
- product 5 is february 2nd.
I'd like to select the oldest 4
So the result would be:
- the row that contains product 1
- the row that contains product 3
- the row that contains product 2
- the row that contains product 5.
How can I do that?