SQLite Forum

Query data between dates
Login
The key problem is that the format of the time stamp, as a text string in the format you are using, does not sort so that times between a given time would sort between those two other times. Note that your second time, since it begins with a T comes BEFORE your first time which begins with a W, as they are stored as just text strings.

You would need to make a computed column converting that value to something that IS monotonic in time, and preferably have an index on that column, to do your operations.