View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default convert time into decimal

Hi Richard
Based on your explanation, it seemed like I cannot convert the result
into decimal if I use the now function?


No, that's not what JE was saying.
NOW() is 25 Jan 2007 18:26 (here in the UK
If you are comparing with 2:00 (with no date) then Excel will interpret
that as 00 Jan 1900 02:00 and the total number of hours between the two
values will be very large (around 940,000)

so use
=(E40-(TODAY()+E44))*24
or
=(MOD(E40,1)-E44)*24

to gain your correct answer.
--
Regards

Roger Govier


"Richard" <nomailplease.com wrote in message
...

How are you populating E40 and E44? If you're using the NOW()
function,
note that it returns the date (as the integer offset from a base date)
as well, so if

E40: =NOW()
E33: 2:00

then your result will be very large.


Correct, E40 is a now function and E44 was the time of 2 hours ago. I
format the cell so that there are no AM or PM display after 2:00, but
I don't want display 2:00, I want 2 instead. Based on your
explaination, it seemed like I cannot convert the result into decimal
if I use the now function?