• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Convert time from Hours and minutes HH:mm to decimal format

jtreanor

New Member
I have a start time and a end time from a SQL database plus the duration in hours and minutes. I want to use the duration as a numeric in decimal form - for example a duration of 1:15 would be = to 1.25 hours.
 
First, welcome back jtreanor. Long time since we last heard from you. =)


As for your question...

Take duration and multiply by 24 to convert.


Why? XL counts a 24-hr period (1 day) as 1, and time is stored in decimal format. I.e., 12 hrs = 0.5

So, to convert from a value with days as the unit to a value with hours as the unit, we multiply by conversion rate 24 hrs/1 day
 
Hi,


Suppose you have 1:15 in A1 and paste the below formula in B1.


=B1*24&" Hours"


Thanks,

Suresh Kumar S
 
Back
Top