See the explanation of SQLITE data types here, they're essentially useless.
Not sure exactly where else you read that, but it's exactly what I said in my prior post.
Your original example shown the comparison was done in SQL using the BETWEEN operator. If your example has changed and you haven't re-posted your code, you might want to consider that or else you leave us all dazed and confused when you make statements that aren't supported by the example code you post.
You're stuck with the format required by the database engine you chose, which in this case is SQLITE. Make it easy on yourself and store the date/time data in one of the supported (and documented) formats. You can read the date/time data from the database and show in any format you desire, but the key is you need to store date/time data in a format the database will recognized it as date/time data.
I can't figure out what your new problem is, but if I had to guess, it's because you haven't stored data in one of the documented date/time formats and so SQLITE is doing pure lexical comparisons of what you want to be treated as date/time data. i.e. in your desired format, you want 10-06-2016 > 10-07-2015. Since it's not stored in a supported SQLITE date/time format, SQLITE winds up doing a comparison based on lexical order, which means that 10-06-2016 < 10-07-2015, clearly not what you expect.
The supported/recommended date/time formats like 2016-10-06 vs 2015-10-07 is 1) recognized as a date/time value and 2) lexical order comparison works as you would expect. This is *not* a coincidence.
Edit: Now I see you have started a new post with the same topic... sigh...
Bookmarks