Python Forum

Full Version: Find data using a period of time in SQLITE3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm doing a program to register products using SQlite3 so I need to generate some spreadsheets in Excell with some datas. One of the things that I need is to find the products by it's date of acquisition (that I will enter). However I don't have ideia how to do this search using a period of time. For example, I need all products acquired from January/7/2018 until December/23/2019 but I don't know a simple way to do it, neither I have found something like it. I'm new on Python and programming.
SQLite doesn't have a date type, so presumably you'll store the date as text and there are useful functions to work with dates (see section 2.2 here). You should be able to use those in a WHERE clause in your SELECT statement.
(Jul-30-2020, 04:48 AM)ndc85430 Wrote: [ -> ]SQLite doesn't have a date type, so presumably you'll store the date as text and there are useful functions to work with dates (see section 2.2 here). You should be able to use those in a WHERE clause in your SELECT statement.

Oh thanks, it helped so much. I used BETWEEN and it worked. Thanks!