Yes, this will work.  It's a long story.  I am creating a Gantt visual schedule 
of a project based on the tasks dates, and I want to show the visual effects 
per weeks.  But, you have hit the hammer on the nail, as we say in Spanish. 
This I can use.

Donald Griggs, Thursday, May 2, 2019 04:16 PM, wrote...
To: SQLite mailing list
Subject: Re: [sqlite] Getting the week of the month from strftime or date 
functions

Hello Jose,

Regarding: "...but I need to get the week of that month based on the date."

One interpretation of your question might me:

Given a date "d", which, say, falls  on a Wednesday, then return
    1, 2, 3, 4, or 5 denoting whether d is on the 1st, 2nd, 3rd, 4th, or
5th Wednesday of that month.

If that's the question, then the sqlite (or C) expression:
     1 +   (d - 1) / 7

should do it (where the slash represent truncating integer division)
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to