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 days','weekday 0') and date('2011-12-18','weekday 6'); 18|2011-12-18 19|2011-12-19 20|2011-12-20 21|2011-12-21 22|2011-12-22 23|2011-12-23 24|2011-12-24 sqlite> select * from fechas where fecha between date('2011-12-24','-6 days','weekday 0') and date('2011-12-24','weekday 6'); 18|2011-12-18 19|2011-12-19 20|2011-12-20 21|2011-12-21 22|2011-12-22 23|2011-12-23 24|2011-12-24 sqlite> select * from fechas where fecha between date('2011-12-21','-6 days','weekday 0') and date('2011-12-21','weekday 6'); 18|2011-12-18 19|2011-12-19 20|2011-12-20 21|2011-12-21 22|2011-12-22 23|2011-12-23 24|2011-12-24 Igor... I thought I was faced with a syntax problem, thanks for putting me on track. ;) _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users