Moshe Sharon <sharon.mo...@...> writes:

> 
> Hi
> 
> How can I select ....group by week
> 
> moshe

The steps below are an idea - let me know if it works OK.

There is an arithmetic expression known as 'Zeller's congruence'
for giving the day of the week, 0-6 ... look it up.

The last step in the calculation is taking residue modulo 7.

However, if you don't do this, but instead, integer divide by 7,
then results sharing the same quotient should be in the same
week.

If your week starts on a different day-of-week from Zeller,
add the appropriate number of days before division.

Regards,
MikeW



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to