Home > Common Problem > body text

How to remove time from date in Excel

王林
Release: 2023-05-17 11:22:28
forward
17566 people have browsed it

Change date format in Excel using number format

The easiest way to remove time from a date in Excel is to change the number format.

This does not remove the time from the timestamp - it just prevents it from displaying in your cell. If you use these cells in calculations, the time and date are still included.

To change the date format in Excel using number format:

  1. Open your Excel spreadsheet.
  2. Select the cell containing your timestamp.
    How to remove time from date in Excel
  3. In the main menu, select the down arrow at the end of the Number Format box.
    How to remove time from date in Excel
  4. Choose a date format.
    How to remove time from date in Excel

After you change the format, the time will stop appearing in your cells.
How to remove time from date in Excel

If you click on one of the cells, the time format is still visible in the formula bar.
How to remove time from date in Excel

Change the date format in Excel using cell format

The above method only gives you two time/date options to choose from. If you want more control over how your data is displayed, you'll want to use the "Set CellFormat" method.

To change the date format in Excel using advanced cell formatting:

  1. Open your Excel spreadsheet.
  2. Select the cell or cells that contain your timestamp.
    How to remove time from date in Excel
  3. Right-click and select Set CellFormat. Alternatively, you can use the shortcut Ctrl 1 on Windows or Cmd 1 on Mac.
    How to remove time from date in Excel
  4. In the Numbers tab, click Date and select a date format that does not include time.
    How to remove time from date in Excel
  5. Click "OK" to confirm.

The date is now displayed without the time, but if you click the cell, the time is still displayed in the formula bar.

How to remove time from date in Excel

Removing time from date using INT function

To completely remove time information, you can use the INT function. That's because timestamps are in decimal form. The number before the decimal point represents the date, and the number after the decimal point represents the time.

INT function deletes everything after the decimal point, removes time information but retains date information.

To remove time from a date using INT in Excel:

  1. Click on the cell where you want the edited date to appear.
  2. Enter=INT(
    How to remove time from date in Excel
  3. Select the cell containing the timestamp (or type the cell reference manually).
    How to remove time from date in Excel
  4. Type the last closing bracket and press Enter.

Your results will now show a time of 12:00 AM. This is because the cell is still Takes a format that displays the date and time. Since the time portion is now zero, it displays it as 12:00 AM.

How to remove time from date in Excel

To completely remove the time, follow the previous section Follow the steps in to change the date format to one that does not include the time.

Making the Change in Excel

Knowing how to remove time from a date in Excel can allow you to display exactly what you want of data.

You can provide more detailed date information by adding the month in Excel. If your timestamp displays as text, you can also convert the text to a date. In Excel, you can Cut text to remove unnecessary parts.

The above is the detailed content of How to remove time from date in Excel. For more information, please follow other related articles on the PHP Chinese website!

source:yundongfang.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template