Week Numbers of the Year

For HanDBase related topics that are not specific to one platform.

Week Numbers of the Year

Postby royaltiger » Mon Oct 24, 2016 6:07 am

HI
I struggle on formulas and have searched most of the databases, I wanted to add the week number of the year into a database of mine, I have a start date field but would like to know what the formula would be to give me the week number of the year by any given date added. many thanks for helping
royaltiger
 
Posts: 11
Joined: Wed Mar 16, 2016 6:29 am

Re: Week Numbers of the Year

Postby glenwf » Fri Nov 04, 2016 1:31 pm

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.
glenwf
 
Posts: 167
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA

Re: Week Numbers of the Year

Postby royaltiger » Fri Nov 04, 2016 2:39 pm

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 ?
royaltiger
 
Posts: 11
Joined: Wed Mar 16, 2016 6:29 am

Re: Week Numbers of the Year

Postby dhaupert » Fri Nov 04, 2016 3:45 pm

Just a quick search and saw this:

viewtopic.php?f=16&t=3877&p=17185&hilit=week#p17185

Not sure there is a satisfactory answer there but worth a look!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Week Numbers of the Year

Postby royaltiger » Tue Nov 08, 2016 5:28 am

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.
royaltiger
 
Posts: 11
Joined: Wed Mar 16, 2016 6:29 am

Re: Week Numbers of the Year

Postby ddhsoftwareadmin » Tue Nov 08, 2016 6:30 am

That will do the trick! Perhaps you can share this on the HanDBase Gallery? It seems to come up fairly often on these forums!
ddhsoftwareadmin
Site Admin
 
Posts: 221
Joined: Tue Dec 09, 2008 2:13 pm

Re: Week Numbers of the Year

Postby curtterp » Tue Nov 08, 2016 8:02 pm

Just uploaded to the Gallery "WeekByDate"

it has 30 years of dates and week of the year
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 679
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Re: Week Numbers of the Year

Postby glenwf » Fri Nov 11, 2016 12:45 pm

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???
glenwf
 
Posts: 167
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA

Re: Week Numbers of the Year

Postby uboche » Fri Nov 11, 2016 3:38 pm

curtterp wrote:Just uploaded to the Gallery "WeekByDate"

it has 30 years of dates and week of the year


Are your week numbers ISO or US American?
Regards,
Ulrich Boche
uboche
 
Posts: 128
Joined: Wed May 20, 2009 1:52 pm

Re: Week Numbers of the Year

Postby curtterp » Fri Nov 11, 2016 10:44 pm

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???



Sorry

I screwed up the first submission.... didn't see the applet name field...

I have submitted it again and it is showing up in the recent submissions now
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 679
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Next

Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests