Just try these and you'll see why.

sqlite> select julianday('18-08-2009');

sqlite> select julianday('now') - julianday('18-08-2009');


Pavel

On Tue, Aug 18, 2009 at 12:58 PM, Gilles Ganault<[email protected]> wrote:
> Hello
>
> I thought this query would work to read a date column that holds the
> DD-MM-YYYY date when the user last logged on, and check how many of
> them logged on in the past two weeks for the last time:
>
> SELECT COUNT(id) FROM members WHERE (julianday('now') -
> julianday(dateconnection)) < 15;
>
> This is returning no row, even though I know a lot of rows have a
> connection date within the last two weeks.
>
> Any idea why this is wrong?
>
> Thank you.
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to