Time Round Up or Down

I have my time sheet in the numbers table. I use the calendar and hit the “now” button in cell C2 when I arrive at a job site. Then I hit the “now” button in cell D2 when I leave for the day. I want the time to automatically adjust and round to the nearest “15 minute” mark or “quarter hour” mark. For example if I show up and hit the “now” button and it auto fills “Thu., Aug. 17, 2023, 12:32AM,” I want it to automatically round down to “12:30AM.” And if I hit the “now” button when I clock out and it shows 12:38AM, I want it to automatically round to the nearest 15 minute mark of “12:45AM.” Is the a formula I can do this with?

iPhone 12 Pro Max, iOS 16

Posted on Aug 16, 2023 10:50 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 17, 2023 5:43 AM

Fresno-Son-of-Bear wrote:

automatically round to the nearest 15 minute mark of “12:45AM.” Is the a formula I can do this with?


You can set up a column next to the column where you enter the Now value, and add a formula like this:




="0:00"+MROUND(TIMEVALUE(D2),1/1440*15)


1440 is the number of minutes in 24 hours.


TIMEVALUE returns the fraction of a day since midnight the previous day.


MROUND then rounds up or down to the nearest 15 minutes.


TIMEVALUE - Apple Support


MROUND - Apple Support


SG




Similar questions

4 replies
Question marked as Top-ranking reply

Aug 17, 2023 5:43 AM in response to Fresno-Son-of-Bear

Fresno-Son-of-Bear wrote:

automatically round to the nearest 15 minute mark of “12:45AM.” Is the a formula I can do this with?


You can set up a column next to the column where you enter the Now value, and add a formula like this:




="0:00"+MROUND(TIMEVALUE(D2),1/1440*15)


1440 is the number of minutes in 24 hours.


TIMEVALUE returns the fraction of a day since midnight the previous day.


MROUND then rounds up or down to the nearest 15 minutes.


TIMEVALUE - Apple Support


MROUND - Apple Support


SG




Aug 17, 2023 1:53 AM in response to Fresno-Son-of-Bear

Hi Fresno-Son-of-Bear,


  1. In Numbers, time does not work as it does in Excel.
  2. In Numbers, the NOW function is literally now. It is not a time stamp. NOW updates whenever changes to a table occur.
  3. I suggest that using 24 hour time without the date will make this simpler.


Try this:



The table NOW is formatted as Date & Time to display only the time portion.

Click the Tick Box to update NOW and immediately copy.


In table 1:

Column B formatted as Date & Time 12 hour clock.

Click in the next B cell and Menu > Edit > Paste Formula Results. That will "freeze" the time.

Column C formatted as Date & Time 24 hour clock.

Formula in C2: B2

Formula in D2: TEXTBEFORE(C2,":")

Formula in E2: TEXTAFTER(C2,":")

Formula in F2: MROUND(E2,15)

Column G formatted as Date & Time 12 hour clock.

Formula in G2: TIME(D2,F2,0)


Regards,

Ian.






This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Time Round Up or Down

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