Link to home
Start Free TrialLog in
Avatar of Learn
LearnFlag for India

asked on

How to calculate date & Time difference between date and time

Hi Experts,

Need help to calculate the date and time difference between two date in attached spreed sheet,(Excluding weekends)

I have tired with multiple formulas but now working correctly, please help us,

Thanks!
Time-differnce.xlsx
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Do you mean like this?
Time-differnce.xlsx
Hi,

A simple B - A formula should do it, and format your cell with a costum format, such as dd/mm/yy hh:mm:ss
Avatar of Learn

ASKER

Hi Roy,

Exactly, is that possible to reflect like 1 days and 15 Mints
I'll get back later, I'm a little busy at the moment
Try a custom number format

d "days" h "hours" mm "minutes"
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is a better formula... it will give you the total hours :

=((NETWORKDAYS(A2,B2)-1)+(IF(TIMEVALUE(B2)>=TIMEVALUE(A2),TIMEVALUE(B2)-TIMEVALUE(A2),TIMEVALUE(B2)-TIMEVALUE(A2)+1)))*24

Now, I don't know how you want to display it...

1.  1 day 2 hours 13 minutes
2.  26 hours 13 minutes
3.   26.23 hours

My above formula will display as number 3
Previous comment from author states how they want result displayed; as per number 1.
Avatar of Learn

ASKER

This is prefect, Thanks a lot Rob.
Glad I was able to help.