Hi Moshe,

  There are probably a number of ways to do this.  One possibility would be
to store your dates in binary date value within the sqlite database, which I
believe is so many seconds since some date in 1969.  You could then use a
constant such as:

#define SecondsInWeek 60*60*24*7

You could then use the starting date also in this format to select where the
value in the database was greater than the starting day and less than the
starting day plus SecondInWeek.  To select the next week add SecondsInWeek
to your starting value and reiterate...

-Tom

On Thu, Feb 5, 2009 at 8:43 AM, John Stanton <jo...@viacognis.com> wrote:

> You need a function which gives the week number.  Note that this is
> calculated differently in the USA and Europe., so you need to use the
> correct rules to write the function.
>
> Moshe Sharon wrote:
> > Hi
> >
> > How can I select ....group by week
> >
> > moshe
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to