← All how-to recipes

How to remove the time from a date-time

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Strip the time portion off a timestamp so you're left with just the date — for grouping and matching by day.

The formula

AppFormulaNotes
Excel (desktop)=INT(A2)INT drops the fractional (time) part. Format the result cell as a date. TRUNC(A2) does the same.
Google Sheets=INT(A2)Identical.
LibreOffice Calc=INT(A2)Identical.

How it works

A date-time is stored as a whole number (the date) plus a fraction (the time), so INT keeps just the whole-number date part and discards the time: July 21, 2026 at 14:30 becomes the date serial 46224 (format the cell as a date to read it). This matters when you group or match by day — two timestamps on the same day won't equal each other until the time is stripped, which is why cross-referencing or SUMIFS on raw timestamps quietly misses rows. TRUNC(A2) gives the identical result. To keep only the TIME instead, subtract the date: =A2-INT(A2), or MOD(A2,1).

Verified, not just documented

We ran =INT(DATE(2026,7,21)+TIME(14,30,0)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 46224 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 46224 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

INT — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons