![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
How do I calculate the elapsed time between the following dates:
2/2/02 09:15 2/3/02 17:15 |
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Essex, England
Posts: 458
|
Assuming that you don't want a decimal answer (28.3333 days) which you can get by simply subtracting one from the other....
With your first time in A1, the second in A2 you could try... =CONCATENATE(TRUNC(A2-A1)," days ",TRUNC((A2-A1-TRUNC(A2-A1))*24)," hours ",TRUNC(((A2-A1-TRUNC(A2-A1))*24)-TRUNC((A2-A1-TRUNC(A2-A1))*24))*60, " minutes") which will give you "28 days 8 hours 0 minutes" as text HTH GaryB [ This Message was edited by: GaryB on 2002-02-28 00:57 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,315
|
Quote:
=((B2-A2)*24)/24 where A2 is earlier in time than B2 (that is, B2 > A2, wrt to date. Custom format C2 as [h]:mm I get wrt the example: 32:00 Is this what you're looking for? |
|
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
There seems to be quite a discrepency between the offered solutions - is your later date 3-FEB-02 or 2-MAR-02 ??
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,315
|
Quote:
"How do I calculate the elapsed time between the following dates: 2/2/02 09:15 2/3/02 17:15" I assumed American usage: mm/dd/yy that is: 2-Feb-02 09:15 3-Feb-02 17:15 where 3-Feb-02 is later in time, if you ask me. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|