View Single Post
  #20   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default How to I subtract two dates & times to obtain a time

"msbutton27" wrote:
Once I removed those spaces I found the equations worked


That surprises me. I thought it was the lack of a comma after the day
number that caused the problem.

For my edification, please post the corrected form of the date/time that you
are using. And please post the value of TYPE(A1), assuming the corrected
timestamps is in A1.


----- original message -----

"msbutton27" wrote in message
...
Thanks Everyone - I found the root cause, in the field of Column A & B
there
were 2 extra spaces in front of the date/time therefore it was not
converting
properly. Once I removed those spaces I found the equations worked -
thanks
folks.

...Mike

"Luke M" wrote:

msbutton27,

This is my suspicion as well. Please see my other post for a quick,
painless
way to convert your text values to date serials.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"msbutton27" wrote:

I actually think I know what is going on.

I am opening a TEXT file that contains 2 columns, and 900 rows. So when
I
convert it from text to excel for some reason Column A or B are
changing to
the correct format, it is getting picked up as TEXT. I can format the
columns
manually and it has no affect, the only way I see to do this is to
enter them
in manually all over - is there a better way?

...Mike

"Eduardo" wrote:

Hi,
use

=+RIGHT(B3,5)-RIGHT(A3,5)

and then format column c as

h:mm

hope this helps

"msbutton27" wrote:


Thanks but the [t]:mm would produce and error when trying to
implement.