This has been discussed earlier, so just search for "Week of Year" and you will find a very complicated answer and a simple, though not so accurate an answer. That as I recall is simply days of year / 52 = week number of year and then take the whole number.
Although I have searched the site , I couldn't find a satisfactory answer or example of how to do the calculation. I do believe its complicated which is why its been difficult to find answer. The iso calculation which says the week begins on a Monday, and Thursday must be in the first week of the year comes into play, Leap years is another factor, when you research, you then realize its complicated, sometimes the first week of the year starts in the last week of December, sometimes there are 53 weeks in the year. I've seen examples of the calculation in other code language but it doesn't fit into the calculated field of Handbase. What would be the closest language code to use in the calculation ?
Not sure there is a satisfactory answer there but worth a look!
Ended up taking the easy option, created a database with calendar date and week numbers from excel, made 15 years worth of dates,about 6000 records, imported into database and created a relationship with the date.
That will do the trick! Perhaps you can share this on the HanDBase Gallery? It seems to come up fairly often on these forums!
Just uploaded to the Gallery "WeekByDate"
Sorry, but I can't find "WeekByDate". It isn't in the recent submissions list, nor can if find it with the search engine. Did you withdraw it???
curtterp wrote: Just uploaded to the Gallery "WeekByDate"
Are your week numbers ISO or US American?
glenwf wrote: Sorry, but I can't find "WeekByDate". It isn't in the recent submissions list, nor can if find it with the search engine. Did you withdraw it???