Trimming a date in Excel means shortening it to just the part you need, usually removing the time stamp so only the calendar date remains, or cutting off the time portion that Excel stores behind the scenes. The quickest method: use =INT(A1) to strip the time and keep the date, or use the DATE, TEXT, or TRUNC functions to trim dates to a year, month, or day. Below are all the reliable ways to do it, depending on what you mean by "trim."
What You'll Need
- Excel on Windows or Mac (Excel for the web also works for most formulas)
- A spreadsheet containing dates, ideally in a single column
- Basic familiarity with entering formulas in a cell
Step-by-Step
Method 1: Remove the Time from a Date (Keep Only the Date)
- Click an empty cell next to your first date. For example, if your dates start in cell A2, click B2.
- Type =INT(A2) and press Enter. Excel stores dates as numbers and times as decimals, so INT keeps only the whole-number date part.
- The result may show as a serial number like 45321. With the cell still selected, go to the Home tab and choose Short Date or Long Date from the number format drop-down in the Number group. (Exact labels can vary slightly between Excel versions and platforms.)
- Drag the fill handle (the small square at the bottom-right corner of the cell) down to apply the formula to the rest of your column.
- Optional: select the new column, copy it, then use Paste Special > Values over the original column to replace the original dates, and delete the helper column.
Method 2: Trim a Date to Just the Year, Month, or Day
- Click an empty cell next to your first date.
- For the year only, type =YEAR(A2). For the month number, type =MONTH(A2). For the day number, type =DAY(A2).
- Press Enter, then drag the fill handle down to fill the formula.
- If you want the first day of the month for grouping, use =DATE(YEAR(A2),MONTH(A2),1) instead, then format the result as a date.
Method 3: Display a Shorter Date Without Changing the Value
- Select the cells containing your dates.
- Right-click and choose Format Cells (or press Ctrl+1 on Windows, Cmd+1 on Mac).
- In the Number tab, select Date and pick a shorter format such as 3/14/2024 or 14-Mar-24. For full control, choose Custom and type a format code like dd/mm/yyyy or mmm yyyy.
- Click OK. The underlying value is unchanged, only the display is trimmed.
Method 4: Trim Text That Looks Like a Date
- If your dates are actually text (often left-aligned), and you only need the first 10 characters (e.g., 2024-03-14 from 2024-03-14 16:45), type =LEFT(A2,10) in a helper cell.
- To convert the trimmed text into a real date, wrap it: =DATEVALUE(LEFT(A2,10)), then format the cell as a date.
- Alternatively, select the column and use Data > Text to Columns, choose Delimited, and let Excel convert the values to dates.
Common Mistakes
- Using the TRIM function on dates. TRIM only removes extra spaces from text; it does nothing to a true date value.
- Forgetting to format the result of INT or DATEVALUE, so you see a five-digit serial number instead of a date.
- Deleting the helper column before pasting values, which breaks the formulas and shows #REF! errors.
- Applying LEFT() to a real date value, which returns digits of the serial number rather than a readable date. LEFT only works on text.
- Confusing display formatting with data changes. Formatting hides the time but the underlying value keeps it, which matters for lookups and pivot tables.
Tips
- =TRUNC(A2) works the same as INT for positive date serials, so either is fine for stripping time.
- To group dates by month in a PivotTable, right-click a date in the Rows area and choose Group, then pick Months and Years; no helper column needed.
- Use =TEXT(A2,"dd mmm yyyy") when you need the trimmed date as text for labels or exports; note the result is text, not a date.
- Press Ctrl+; to insert today's date as a static value (no time attached), and Ctrl+Shift+; for the current time.
- Always keep a backup copy of your sheet before converting a large date column in place.
Troubleshooting
- The result shows a number like 45321: the cell is formatted as a number. Apply a Short Date format via the Home tab or Format Cells.
- INT or DATEVALUE returns #VALUE!: the source cell probably contains text that Excel does not recognize as a date, or the text is in a different date format (e.g., US vs. day/month layout). Check the cell contents and use Text to Columns to convert.
- The time still appears after formatting: the cell format includes a time code (hh:mm). Open Format Cells and choose a date-only format.
- Dates look like 45321 even after Text to Columns: the column is still formatted as a number; set it to Date before or after conversion.
- Formulas return #REF! after deleting a column: you deleted a cell the formula points to. Undo (Ctrl+Z) and paste values before deleting helper columns.
Frequently Asked Questions
How do I remove the time from a date in Excel?
Use =INT(A2) in a helper cell and format it as a date. This drops the decimal (time) portion and keeps only the date.
Can I use the TRIM function on a date?
No. TRIM removes extra spaces from text only. To shorten a date, use INT, YEAR, MONTH, DAY, or TEXT instead.
How do I show only the month and year?
Either format the cell with a custom format like mmm yyyy (value unchanged), or use =TEXT(A2,"mmm yyyy") for a text result.
Why does my date turn into a number?
Excel stores dates as serial numbers. If the cell format is General or Number, you see the serial. Apply a Date format to display it properly.
How do I trim a date stored as text?
Use =DATEVALUE(LEFT(A2,10)) to cut a standard yyyy-mm-dd string and convert it to a real date, then format the cell as a date.
Does formatting a date change the underlying data?
No. Format Cells only changes what you see. The full value, including any hidden time, stays intact for calculations and lookups.