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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Billing by the hour 2

Status
Not open for further replies.

Factor42

IS-IT--Management
Jan 23, 2003
15
0
0
GB
Hi everyone,

I have just started out on my own in I.T. I have tried several applications that log time but they just don't produce what I would want. I am losing track of calls I get during the day which I can't bill for!

I've started an Access database which I think is going quite well but I cannot work out how i can get it to work out a total bill based on two times of day I put in.
Example: I choose a company name, it filters it down, then it makes a new record for putting in the start time and the end time. I do this and then in the background it needs to work out how many minutes have passed between those two times of day and times it by an hourly rate.

I know this sounds obvious but I just don't know how to get it to work out, say, 14:23 through to 18:12 based on $100 an hour. Do I convert it somehow? I just don't know. Someone help me please.

Thanks in advance

Paul
 
Paul,


This should give you what you need -


DateDiff("h","[StartTime]","[EndTime]") * [Rate]


HTH,

Steve

 
I think SteveR77's solution should be
[tt]
(DateDiff("n",#[StartTime]#,#[EndTime]#) / 60) * [Rate]
[/tt]

If you just compute hours (i.e. "h") then fractional hours are lost. For example
[tt]
Datediff ("h", #11:01 AM#, #11:59 AM#)
[/tt]

Returns zero hours but is in fact 58 minutes or 0.967 hours.
 
Thanks SteveR77 for you entry which was definately on the right lines. Golom, your supplimental to this was spot on. I tried both and you were right. Using a numerical value instead allows minute by minute calculation which is just what i need.

I knew this site wouldn't dissapoint.

Thanks very much for your help, both of you.

Best regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top