• 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.

Subtracting date and time

Hi Ninja

I have a date and time in one cell i.e 4 July 2014 15:54:00 PM and a future date in next cell 8 august 2014 8:56:54 AM

Now i want to subtruct from 8 Aug to 4 July that gives me 35 days but what about time.

Please help me
 
Hi Manish,

I think, excel is giving you correct result.. Just you need to change the Number Format, so that you can view the actual output..

Try to convert result cell as "DD HH:MM:SS" or use below formula..

=TEXT(B1-A1,"DD hh:mm:ss")
 
You need to be careful as if the ending time is less than the start time you'll subtract an extra day, which I don't think is what you want.
 
Hi Manish,

I think, excel is giving you correct result.. Just you need to change the Number Format, so that you can view the actual output..

Try to convert result cell as "DD HH:MM:SS" or use below formula..
=TEXT(B1-A1,"DD hh:mm:ss")
Does the answer need te be text ? =B1-A1 formatted as required will keep the reult a number
 
Thanks for the reply Hui.. But it did not work for me.

kindly find the file and put your formula there.

Thanks
Manish
 

Attachments

  • Manish.xlsx
    10.1 KB · Views: 3
Back
Top