ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date and Time Calculations (https://www.excelbanter.com/excel-discussion-misc-queries/116296-date-time-calculations.html)

Wayne

Date and Time Calculations
 
How can I calculate the difference between a date and time format and another
date and time format? I would like the return value be in hours.

Ex: 10/27/2006 10:00 - 10/26/2006 12:00 = 22 hours

Dave Peterson

Date and Time Calculations
 
Subtract the smaller from the larger and use a custom format of:

[hh]
or
[hh]:mm

The [] means that the hours won't roll into days.

wayne wrote:

How can I calculate the difference between a date and time format and another
date and time format? I would like the return value be in hours.

Ex: 10/27/2006 10:00 - 10/26/2006 12:00 = 22 hours


--

Dave Peterson

David Biddulph

Date and Time Calculations
 
=A1-A2 and format as [h]:mm
--
David Biddulph

"wayne" wrote in message
...
How can I calculate the difference between a date and time format and
another
date and time format? I would like the return value be in hours.

Ex: 10/27/2006 10:00 - 10/26/2006 12:00 = 22 hours




Wayne

Date and Time Calculations
 
Thank you very much.....I learn something new with the brackets [hh].

Wayne

"Dave Peterson" wrote:

Subtract the smaller from the larger and use a custom format of:

[hh]
or
[hh]:mm

The [] means that the hours won't roll into days.

wayne wrote:

How can I calculate the difference between a date and time format and another
date and time format? I would like the return value be in hours.

Ex: 10/27/2006 10:00 - 10/26/2006 12:00 = 22 hours


--

Dave Peterson



All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com