Days in month

J

jzylla

I am trying to calculate the costs incurred, over a period of time but,
having them spread in the month they will be generated.

Example: $5000 worth of costs will be incurred from 3/15/09-4/10/09. I can
calculate the cost per day, based on the range but, I'm not sure how to have
it show only the costs occurred in March.

ultimately, I would like to have a rolling report, where I can output this
info over a 12 month period from the current month, and indicate the actual
costs per month.

Thanks.
 
B

Brett Stone

DateSerial(varYear, varMonth + 1, 0) will tell you the last day in the
varMonth, (varYear is necessary because of February leapyear calc)
-Brett
 
J

jzylla

Then how would I use this to report the amount occurring in the month to
display on a report?

I'd like the report to look like this:

Month Location 1 Location 2 Location 3
Jan $$$ $$$ $$$
Feb $$$$ $$$ $$$
Mar $$$ $$$ $$$
.....
 
L

Larry Linson

It's easy enough to calculate the proportion of costs, but the costs may be
reported as you show but actually expended in particular amounts on specific
days -- in that case, you would need more detail (aka "granularity") in your
cost data, if you really need accuracy.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top