Thank you all. The solution of Jean-Christophe is perfect and thanks to
Igor and Michael I begin to understand the logic of the processing of dates
in SQLite, which is much more powerful than it had expected at first.
sqlite> select * from fechas where fecha between date('2011-12-18','-6
Nando wrote:
> I just realized that the "weekday" is not working as and believed, but is
> much easier. I can make simple queries of the form:
>
> select * from dates WHERE date = date ('2011-12-09 ',' weekday 5 ');
>
> Or
>
> select * from dates WHERE date <= date
I just realized that the "weekday" is not working as and believed, but is
much easier. I can make simple queries of the form:
select * from dates WHERE date = date ('2011-12-09 ',' weekday 5 ');
Or
select * from dates WHERE date <= date ('2011-12-04 ',' weekday 6 ');
And they work properly.
select * from TABLE where DATE between date('now','-7 days','Weekday 0')
and date('now','-7 days','Weekday 6');
Let me try this:
select * from TABLE where DATE between date('now','-6 days','Weekday 0')
and date('now','Weekday 6');
or compare week numbers (%W specification) [slower]
Nando wrote:
> SQLite system for working with dates is very powerful, but I find it
> strange. I'm trying to select the dates between the beginning and end of a
> week defined from the date of a given day. If I understand the documentation
> thing this code should work:
>
>
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Nando [fl446...@gmail.com]
Sent: Saturday, October 15, 2011 4:17 PM
To: sqlite-users@sqlite.org
Su
SQLite system for working with dates is very powerful, but I find it
strange. I'm trying to select the dates between the beginning and end of a
week defined from the date of a given day. If I understand the documentation
thing this code should work:
select * from TABLE where DATE between
7 matches
Mail list logo