Calculate total Hours between 2 date and time

T

Tylim

Hi, Can anyone help me on how i can calculate total hours between 2 date
and time. eg. Field A1 i have 12/25/2005 17:35 A2 i have 12/28/2005
17:00
and result will be in field A3
Pls help. Thanks
 
P

Pete_UK

Just subtract one from the other and format the cell as [h]:mm:ss, i.e.
enter this formula in cell A3:

=A2-A1

Hope this helps.

Pete
 
T

tmingfai

Good one Pete.

You may also use this (A2-A1)*24 to get a more exact hour (with
decimal). This one doesn't require you to change the format of the cell
:)


MF
 
T

Tylim

Thanks. Have another question how can i code the fields with mm/dd/yyyy
hh:mm. so that when i key in i just key in numbers don have to worried
about the the slashes and colon. Thanks again
 
Top