Calculate total time between two dates

L

Lloyd

Hi
i first want to say thank you. I hope I explain myself.

A1. Sunday 23:00
B1. Monday 01:00

=Sum(B1-A1)
I am getting -22 hours

Thank you for your help
 
J

Jacob Skaria

Enter the date and time as below

-Press Ctrl+; (semicolon) in A1 so that excel will input the current date.
Edit the date to suit
-Press spacebar for a space
-Press Ctrl+Shift+; (semicolon) after the space so as to input the current
time. Edit the time to suit
--Press Enter and you will have the date and time in excel date time
format...Now you can right click the cell Format Cells and select a date
format or select custom and enter a format which you would like
--Once you do that in these two cells ; you can find the difference...using
the below formula
=B1-A1
--and custom format the formula cell to the below to display the difference
in hours/ minutes
[h]:mm


If this post helps click Yes
 
D

David Biddulph

Firstly, what number do you want to SUM to B1-A1?
If you just want =B1-A1, and don't want to SUM anything to it, you don't
need the SUM function. If you don't understand what the SUM function does,
look it up in Excel help.

Secondly, for your problem you might want =MOD(B1-A1,1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top