← All how-to recipes

How to remove the time from a date-time

✓ Verified in LibreOffice 25.8.7.3

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=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. Every formula here is confirmed by actually executing it.