Pawl <[email protected]> wrote: > I use TIMESTAMP datatype, disply format is according to local cuture setting > ex: 27.1.2012 13:50:32. > all compare type is same.
There is no TIMESTAMP datatype in SQLite. Your dates are stored as strings, and are being compared using regular alphabetical comparison. For details, see http://sqlite.org/datatype3.html It is advisable to store dates, times or timestamps in one of the formats described at http://sqlite.org/lang_datefunc.html . First, built-in date/time functions can work with them, if you ever find yourself in need of doing calculations on those timestamps. Second, and of immediate importance, these formats are designed in such a way that plain vanilla string or numeric comparison just happens to order dates and times correctly. So, store dates in the database in one of these culture-neutral format. Convert them to and from culture-appropriate format in your application code, when formatting the data for presentation or accepting user input. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

