View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default date to time formula

The formula will work with the below data; only if the dates and time are in
excel date/time formats...

If this post helps click Yes
---------------
Jacob Skaria


"Brownie_D75" wrote:

Yes I did & it still calculates as 4 hours. Where did the other 29 hours go?

"Jacob Skaria" wrote:

Did you custom format the total cell as [h]:mm

Right clickFormatCellsCustomType:=
[h]:mm

--
If this post helps click Yes
---------------
Jacob Skaria


"Brownie_D75" wrote:

I think this formula is missing something. If I put in my data for this
formula, it come up to 4:34. My data says arrival date is 7/28 at midnight &
then date I want the information for is 7/30 at 05:30. There is more than 4
1/2 hours between 7/28 & 7/30.

"Jacob Skaria" wrote:

A.Date = Arrived Date
AODate = As of Date

ColA ColB ColC ColD ColE
A.Date A.Time AODate AOTime Total Hours
7/28/2009 23:56 7/29/2009 5:30 5:34

Total hours in cell E2
=(C2+D2)-(A2+B2)
and custom format the total cell as below..
[h]:mm

If this post helps click Yes
---------------
Jacob Skaria


"Brownie_D75" wrote:

This is where it get a little complicated. The hour the truck arrived is in
military (24:00) in one cell. Then the date is in another. I have to manually
enter the current date & 05:30. I need to calculate those total hours (hours
& minutes are ok too). When I calulated it with the below formula, it only
came up with 13:36. (Truck arrived at 24:56 on 7/28/09. As of 05:30 on
7/30/09 = ??? hours?

"Rick Rothstein" wrote:

If your date/time values are in one cell (each) as real Excel date and
times, then...

=24*(B1-A1)

assuming your later date time value is in B1 and your earlier one is in A1.

--
Rick (MVP - Excel)


"Brownie_D75" wrote in message
...
I need a formula to shows hours between dates.

Example:
Truck arrived @ 22:00. It arrived on 7/28/09. As of 7/30/09 @ 05:30, how
many hours has that truck been here?