Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine Number of Days

Status
Not open for further replies.

dustyjnz

MIS
Feb 2, 2001
1
US
HI, I am an ACCESS programming newbie. I am searching for a way to generate a report on the number of days a service is used. I have a start date (00/00/00) and an end date (00/00/00)and a monthly rate of pay.

I need ACCESS to (1) determine the amount of days from the start date to end date,
(2) take a rate of pay and divide it by the number of days in that current month to get a daily rate, (3) multiply the number of days from start date to end date by the daily rate for that month. Finally display this total on a report. Thanks in advance for anyone who is qualified to solve this and help. It is driving me crazy.
 
(1) DateDiff("d",Date1,Date2)
(2) Rate/(DateAdd("m",1,CurDate)-CurDate)
Of course, if your billing period spans multiple months, this doesn't get you exactly the right info,but it does use the number of days in the current month, which is what you asked for
(3) (1)*(2) I'm not sure where to start with report writing. what do/don't you know? Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top