Hours between two dates

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
591
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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
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,223,877
Messages
6,175,138
Members
452,614
Latest member
MRSWIN2709

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