count time

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I try count in excel amout hours and minutes (in format
[hh]:mm) between two dates (in format yyyy-mm-dd hh:mm).
If one date is in following day (don't count hour 23:00 ÷
02:00, 3 hours) remain following days similarly about 3
hours less.
e.g.
1 date 2004-06-20 22:00
2 date 2004-06-21 03:03

expect result = 2 date - 1 date = 02:03

Can someone please suggest the best way to do this?
Regards
Mark
 
Hi

If you subtract the earlier time from the later one, and format as time, you
will get 5:03 - well, I did!! Have a look here for some help and advice on
date/time calculation:
http://www.cpearson.com/excel/datetime.htm#AddingTimes

--
Andy.


I try count in excel amout hours and minutes (in format
[hh]:mm) between two dates (in format yyyy-mm-dd hh:mm).
If one date is in following day (don't count hour 23:00 ÷
02:00, 3 hours) remain following days similarly about 3
hours less.
e.g.
1 date 2004-06-20 22:00
2 date 2004-06-21 03:03

expect result = 2 date - 1 date = 02:03

Can someone please suggest the best way to do this?
Regards
Mark
 
Hi,

Assuming that none of your times actually fall within the
period 23:00 to 02:00,

=(B2+C2)-(B1+C1)-3/24*(B2-B1)

with B1:= 2004-06-20 etc.

gives 02:03

Hope this helps!
 

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

Back
Top