Round timestamps to the nearest second

Turn 7/4/2026 11:59:59.6 PM into 7/5/2026 12:00:00 AM. The date moves too.

What you'll make

In Excel: 7/4/2026 11:59:59.6 PM becomes 7/5/2026 12:00:00 AM.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8The date and time, with tenths of a second.11/4/2026 2:30:15.6 PM
2*86400Turns it into seconds. A day has 86,400.4002964215.6
3ROUND( … ,0)Rounds to the nearest whole second.4002964216
4/86400Turns the seconds back into a date and time.11/4/2026 2:30:16 PM

Read it from the inside out: ROUND works first, then /86400 makes it a date and time again.

=ROUND(A8*86400,0)/86400

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own dates and times. Paste dates with times into the green column of the Template tab. The rounded times fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Close to midnight, rounding up moves to the next day. That's right, so keep the new date.

Microsoft's help: ROUND function