Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Leyla,
A1=Date1 B1=Date2 C1=B1-A1 and set C1 format as Number (so you should get decimal value in days) once you have that Seconds =$C$1*24*60*60 Minutes =$C$1*24*60-MOD($C$1*24*60,1) Hours =$C$1*24-MOD($C$1*24,1) Days =$C$1-MOD($C$1,1) Months =$C$1/30-MOD($C$1/30,1) Months and Days =CONCATENATE($C$1/30-MOD($C$1/30,1)," Month ",($C$1-MOD($C$1,1)-(MOD($C$1/30,1)*30))-MOD(($C$1-MOD($C$1,1)-(MOD($C$1/30,1)*30)),1)," Days") I'm sure there should be simpler formula, but it does not strike my mind now. hope this helps? regards, -kc *Click YES if this helps. "Leyla" wrote: Hi I have cells with dates and times together and I am trying to take the difference of two dates. I have found out how to get the result in days:hours:minutes. However, I would like to get the results with the month as weel (months:days:hours:minutes). However, my main problem seems to be that if there is less than a month, the default is zero. Adding days and months was a solution to my orginal problem of not being able to change hours to go past 24. Help with either issue would be appreciated. I have Excel 2002. Thank you. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
difference of 2 dates | Excel Worksheet Functions | |||
Difference between dates | Excel Worksheet Functions | |||
difference between two dates | Excel Discussion (Misc queries) | |||
Difference of two dates | Excel Discussion (Misc queries) | |||
difference between dates | Excel Discussion (Misc queries) |