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

Simple time Calc 1

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I have a simple for that has a button that stores a Starttime and an endtime. I need to run a report that shows the total time for that record. I am currently using the following:

=DateDiff("n",[end time],[start time])/60

but for a record that has a start time of 8/24/2006 10:39:15 AM and an end time of 8/24/2006 10:40:15 AM it calculates as 0:24 instead of one minute can anyone help as im sure im just not doing something right.

Thanks!

Paul
 
Hi Paul!

Have you tried not dividing by 60? The function you have should return minutes by itself.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Thanks Jebry i dont know what I was thinking. That worked however brings another problem. If the start time is 8/24/2006 11:32:00 AM and end is 8/24/2006 11:59:30 AM it shows 27.00 instead of 27.50 any time seems to be rounded down...is it my formula? can you help?

thanks again!

Paul
 
Hi!

Well, I haven't tried it so it is air code:

=DateDiff("s",[end time],[start time])/60

This will bring back seconds and maybe the /60 will put it in the minute:second format. You can also try it without the /60 and maybe it will be in the proper format.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top