# How do I calculate a week number based on a field?

Views: 23

=Format([TimesheetTableTemp]![Task Date],"ww")

where the task date is the location of the date but I get a prompt and then error

Sponsored Links:

Thank you for taking the time to report an issue.

What's wrong... Please write below.

## Similar posts...

## Calculating percentage (%)

Example:

First field which will calculate the % of Q1

Second field which will calculate the % of Q2

the third field which will calculate the % of Q3

and the fourth field will calculate the % of Q4

AND the last field (the fifth one) should be the sum of Q1, Q2, Q3 and Q4 percentages and which should be equal to 100%

## Converting dates into week numbers on graph

As an example for April I would have Week 1 and every sale done between 02/04/2012 and 06/04/2012 would go into Week 1 category and so on (counting Monday to Friday), then Week 2 would have all records between 09/04/2012 and 13/04/2012 - so forth for every week.

Graph is not static of course so it wouldneed to update accordingly for every new upcoming sale as well.

to sum number of hours for each company department (just 2 of them) each week based on the dates I have?

## Report with Running Sum by week

EmpName

AnnualContributionAmt

PayrollDedAmt

SumofPmts

Balance.

I would like to be able to keep a running total of how much the employee has contributed each payroll based on his deduction. The payroll is bi-weekly so there are 26 periods in the year.

the payroll dedution amount is a calculated amount based on the annual contrbutuion/26

I was hoping that I could have a field on my report that would allow me to key in the week number and it would calculate the Sum of his dedcutions but I can not find a way for this to work.

Will this work or is there a better way to go about getting this information onto my report.

## Count the number of Working Weeks

When we enter the serial number of a battery, we have to check if it will be rejected or not. For example if the serial number was SP044000056: the third digit is for the year this means that the batteries was manufactured in 2010 and on the 44th working week.

So the problem now is to calculate the number of week between the today's working week and the working week in which the battery was manufactured.

I am able to extract the working week of the battery which is 44 and the year which is 2010 with the function MID.

How can I continue

## Calcuating Values Pt/2

I mean with his code we are calculating the total PcsProduced based on the legenths*PPL. fields

I need to be able to calculate hours earned based on the PcsProduced field

this is calculated by taking the PcsProduced / SpecSPM that will = Hours Earned

I also need to calculate the Standard Hours. To calculate this I would take the Number Machine Run / 480 / 60

Basically I need to calculate multiple values, based on other calculated values. Possible

## Financial/ Fiscal week number

## Volume of work per week

## Yes / No switch with odd or event numbers

## Changing Week Start Day

Which worked fine, now we open Sunday the Sunday values are pushed to the next week number. The customer wants all data for the week grouped Monday to Sunday, otherwise I'd just let the pushed week roll into the next week.

So for this week 16th to 22nd May, my week number would normally be 21. But the 22nd data is added to week 22

The current query field is:

Code:

Format([CallDate],"ww")

This works. I've done some digging and found this possible suggestion

Code:

Val(Format([WorkingDate], "ww", vbMonday))

So my query field looked like this

Code:

Val(Format([CallDate],"ww", vbMonday))

But when I leave the field it adds [] round the vbMonday, and the query fails.

So any pointers so that my week number group goes from Monday to Sunday?