Adding and Subtracting Times

G

Guest

I have a start time say 9:23. I have an end time say 9:27. I have a history of start time and end times. I want to add all the differences and display the total in Hours and minutes format(Short Time format). Example
Start Time End Time Differenc
09:23 09:40 00:1
09:25 09:47 00:2
09:30 09:45 00:1
09:35 09:50 00:1
====== ======= ======
Total 01:0
Can anybody help? Thanks in advance.
 
D

Douglas J. Steele

Use DateDiff("n", [StartTime], [EndTime]) to give you the difference in
minutes, and sum that.

If it's absolutely essential that you display the differences (and sum) in
h:mm format, write your own function to convert from minutes to h:mm.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Daniel Brown said:
I have a start time say 9:23. I have an end time say 9:27. I have a
history of start time and end times. I want to add all the differences and
display the total in Hours and minutes format(Short Time format). Example.
 

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