On Wed, Jan 19, 2011 at 5:06 AM, Ian Hardingham <i...@omroth.com> wrote:
> Hey guys. > > Probably unwisely, I store dates in the following format: > > "year month day hour minute" > > For example: > > "11 1 4 16 22" > Perhaps you could write an extension function (using sqlite3_create_function()) that will convert your data format into ISO8601: " YYYY-MM-DD HH:MM", or in your case, "2011-01-04 16:22". Then the strings will compare in date order, the dates will be more easily human-readable, you can leverage the built-in date/time functions of SQLite, and you will be in compliance with an international standard. > > I wish to find all rows in a table which are more than 8 days old. Is > there a way of doing this in SQLite or should I just do it in my own code? > > Thanks, > Ian > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users