Hi There,
I like to find how many weeks exist in each month for a year. I have query for each month. I have query in access (summing the qty each month for each Item) for each month January through December from a table that has Qty for each item for each day.
The query has the year, month, Total Quantity. For example the Jan query would have the following fields
Yr Mth Qty Item
2018 1 10000 ABC
I would have to find the weekly quantity for that I would have to divide this qty by the number of weeks each month has in a year and it differs each year.
so I like to see the query result with another field MaxWk ( that will tell the total week in that month for the year)
I tried the datediff funtion doesn't work .I tried MaxWk= DateDiff("ww",1/1/[yr],1/31/[yr],2), just returns 0
Any idea how I can do this?
Thanks
DateDiff("ww",DateValue("1
For one, you weren't telling access what you were providing as a date. Dates are delimited with # signs: #1/1/2018#, but you can't include parameter brackets in it. You have to build your date as a text string and then get the datevalue of your date string.