Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > #v+ > SQLite version 3.5.6 > Enter ".help" for instructions > sqlite> select date('now'); > 2008-03-28 > sqlite> select date('now')-14; > 1994
date() function produces a string. You are trying to subtract a number from a string, at which point SQLite converts the string to number ('2008-03-28' becomes 2008) and performs the subtraction (2008 - 14 == 1994). You want select date('now', '-14 days'); or select date(julianday('now') - 14) Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users