Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Converting time to hours in numbers

Ok so I'm trying to convert time to hours in numbers and maybe my brain is just totally fried or something but I cannot figure out what formula to put in the cell to convert.


Example:

Employee A: 8:00 am to 3:30 pm = 7.5h


How do I put that into a formula??

MacBook Air (M1, 2020)

Posted on Mar 11, 2023 11:05 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 11, 2023 2:00 PM

Hi Stevie,


Like this:

Formula in D2: C2−B2

Start with a table formatted as Automatic. As you enter times in columns B and C, Numbers will format those cells as Date & Time. Column C becomes Duration format.


Take a look at the "Sign in" table in this template (New from Template Chooser):


Call back with questions. Regards,

Ian.

4 replies
Question marked as Top-ranking reply

Mar 11, 2023 2:00 PM in response to steviemeeviebobeevie

Hi Stevie,


Like this:

Formula in D2: C2−B2

Start with a table formatted as Automatic. As you enter times in columns B and C, Numbers will format those cells as Date & Time. Column C becomes Duration format.


Take a look at the "Sign in" table in this template (New from Template Chooser):


Call back with questions. Regards,

Ian.

Mar 14, 2023 1:45 AM in response to steviemeeviebobeevie

Hi Stevie,


Date and Time calculations (and data entry) can be puzzling in Numbers.

If a cell is displaying a Date and Time, just a Date, or just a Time of Day, the cell actually holds a Date and Time value, marking a specific instant in the flow of time.


Having that Date value in the cell can lead to several head scratching sessions before the user reaches the AHA! stage. Here's a Table using the start and finish times listed in your post above.


All cells in column B contain the same Date and Time value — 8:00 in the morning on the 14th of March, 2023. In each cell, only the Time of Day part was entered, and the Date of entry was automatically entered to complete the D&T format.


When the earlier D&T is subtracted from the later D&T, the result is a Duration, expressed in hours and minutes, as seen in rows 2 and 3 of Column E. This result is the same as th one in your example, but is expressed as hours and minutes, separated with a colon.


In Row 4, the DUR2Hours function ( DURation to Hours ) is used to convert the hours and minutes values in the result to a number representing the number of hours and the fraction of an hour equal to the 30 minutes, expressed as a whole number and a decimal fraction part.


Very simple formula, but it does take a while to get the D&T concept into the 'got it' phase.


Looking ahead: Another oddity, it your not familiar with it is in calculating the hours of a shift that crosses the midnight boundary. If the State and End D&T values each contain the correct date, all should be well. If both have the SAME date, Numbers will correctly complete the calculations, but the result will not be correct.


When the user enters only the Time part of a D&T value, Numbers sets the Date part to the date on which the entry was made. If both entries are made on the same day, Start and End will both have the same Date, and in most cases, this means the shift, as recorded Started at, say 9:00PM and finished at 4:30AM the same day.


For shifts crossing the midnight boundary, you'll need to either enter the full Date and Time of both the Start and Finish, or take other measures to ensure the result will be correct.


Regards,

Barry

Converting time to hours in numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.