Time difference

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
In Col. 'A' a time is enter through time(08,0,0) function and in Col. 'B'
the current time through Now() function. How I can calculate the difference
or the number of hours and minutes laps between two times.
please help me to get the answer.
thanks..
 
Hi
use
=B1-A1
and format as time

or if the time can span midnight try
=B1-A1+(B1<A1)
 
if you use time(8,0,0) then you don't care about the date.
If this is the case, you have to substract the date part from the now()
function
Therefore, column B should be:
=NOW()-FLOOR(NOW,1)
which gets rid of the integer part (date)
and then column C is just:
B - A
You're just going to get a decimal number; format it as hh:mm and you'll get
what you want


guillermo
 

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

Similar Threads


Back
Top