helemacd wrote: > anybody know how to return the start of the week and end of the > week???
select (case strftime('%w', T) when '0' then T else date(T, 'weekday 0', '-7 days') end) from (select date('now') as T); -- or select date(T, '-' || strftime('%w', T) || ' days') from (select date('now') as T); This is start of the week, assuming the US convention of beginning the week on Sundays. End of the week is left as an exercise for the reader. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users