Hours zero display

DDH

Active Member
I am trying to have a hour displayed as 15 hrs not 015 hrs.

Cell I 10 in Text format 10-11-2019 3:48 PM
Cell L 10 in Text format 10-12-2019 7:38 AM

Formula in M 10 INT(L10-I10)&TEXT(L10-I10,"h"" hrs ""m"" mins """)

it returns the answer of 015 hrs 50 mins.

I am trying to have it return 15 hrs 50 mins I don't know how to not have it display the zero in front of the 15 hrs.

Thank you for your help.
 

PCL

Well-known Member
Between I10 and L10 there is quite 1 month difference, it cannot gives only 15 hours
 

Tetra201

MrExcel MVP
I am trying to have a hour displayed as 15 hrs not 015 hrs...
Just remove the INT(L10-I10)& part -- it actually shows number of days between the timestamps. The formula becomes

=TEXT(L10-I10,"h"" hrs ""m"" mins """)
 

DDH

Active Member
Just remove the INT(L10-I10)& part -- it actually shows number of days between the timestamps. The formula becomes

=TEXT(L10-I10,"h"" hrs ""m"" mins """)
Tetra201 & PCL - Thank you for your reply. Removing the INT(L10-I10)& made it work perfect, I never thought of doing that. PLC - I am sorry I did not understand what you meant.
Thank you very much for all of your help. ddh
 

Some videos you may like

This Week's Hot Topics

Top