Barton Torbert wrote: > What you suggested sort of worked. The problem was that the two > dates I were comparing were only 1 minute apart, but I had to put in > '-1000 minutes' and '+1000 minutes' to get the test to work. > > My two data values are; > 2009-04-13T12:19:00.0000000 > and > 2009-04-13T12:18:00.0000000
datetime() produces the value without 'T' in the middle - like this: 2009-04-13 12:09:00. So, as long as the date part is the same, the value with a space would alphabetically precede the one with 'T'. In place of datetime, try strftime('%Y-%m-%dT%H:%M:%f', t1.dateitem1, '-10 minutes') Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users