• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to calculate hours/minutes between two different dates

Hi,

Everyone, looking at quality and promptness of responses I am posting my question. Though it might seem very basic but I am sort of beginner.


Question is:

If I want to know the time duration between two timws how I can calculate it as in I get 2 if I subtract 8 from 10.. How to get answer in minutes/hours for question


Start Time: 11:00 PM Sunday 23rd April 2009

End Time: 1:00 Monday 24th April 2009


Total Time consumed= ?
 
Hi Haroon ,


The difference between two times entered properly as times , is found the same way as we find out the difference between two numbers i.e. by subtracting.


For example , using the same data that you have given , I enter the first time as : 4/23/2009 11:00:00 PM


The second time is entered as 4/24/2009 1:00:00 AM


Now , when I subtract the first time from the second , I get 0.0833333 , which is in fractions of a day. Multiplying this by 24 hours , I get 2 , which is the correct answer.


Thus , the basic requirement is that the times are entered as times , in the proper format. Can you confirm whether the times that you will be using will all have a standardised format , and if yes , what will that format be ?


Narayan
 
Back
Top