Hours between two dates

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
571
Office Version
  1. 365
Platform
  1. Windows
I have these dates and time

(P16) 8/22/24 5:23 AM
(S16) 08/23/24 5:18pm

I am trying to just calculate total hours between the 2 dates.

I tried =TEXT(S16-P16,"h") but I get a #VALUE! error.


Any help would be appreciated.
James

 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try putting a space between the 8 and the pm in 08/23/24 5:18pm

Your formula also needs some [] or use the formula by @myall_blues formatted to suit
Excel Formula:
=--TEXT(S16-P16,"[h]")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top