Working with Microsoft Excel is great fun. We usually work to process data and get information using MS Excel. When we collect data, we use date and time with the corresponding data. In this article, we will discuss how to remove timestamps from date in MS Excel with suitable examples and proper illustrations.
Download Practice Workbook
Download this practice workbook to exercise while you are reading this article.
4 Methods to Remove Timestamp From Date in Excel
We will discuss 4 methods to remove timestamps from date in Excel. We have taken a sample time with the date and will remove the timestamps from that.
1. Discard Timestamps by Changing Number Format from Date
- We add a column named Date Without Time to show the result without a timestamp.
- Now, copy the dates from column B to column C.
- Now, press Ctrl+1 .
- A new dialog box named Format Cells will appear.
- From Number go to Date in the box.
- Change the date format. The chosen format will contain only dates.
- Then press OK.
- We see that times are removed and only dates are showing.
In this way, we can easily remove the timestamp.
2. Remove Timestamps Using Excel Formulas
We will apply the formulas to remove the timestamp.
2.1 Use the INT Function
The INT function rounds down a number to its nearest integer number.
number – The real number we want to round down to an integer.
We will use the INT Function here.
- Go to Cell C5.
- Write the INT function. The formula will be:
- Now, press Enter.
- Drag the Fill Handle icon to the last.
Here, we see that dates are showing with 12:00 AM, as this function round down 00:00 or 12:00 AM is showing. Now, we will remove that also.
- Then, go to the Home tab.
- Select Number from the commands.
- Finally, select Short Date.
- Now, all timestamps are removed from the date.
2.2 Use the TEXT Function:
The TEXT function allows us to change the way a number appears by applying the desired formatting to it with format codes. It is very useful in situations when we want to combine numbers with text and symbols. This will convert numbers to text, which may make it difficult to reference in later calculations.
value – A numeric value that we will convert into text.
format_text – It is the desired format that we want to appear after applying the function.
We will use the TEXT function in this section.
- Go to Cell C5.
- Write the TEXT Select format as “mm/dd/yyyy”. So, the formula will be:
- Then, press Enter.
- Pull the Fill Handle icon to the last cell containing data.
Here, we see only the date without a timestamp.
Read More: How to Convert Timestamp to Date in Excel (7 Easy Ways)
2.3 Use the DATE Function
The DATE function is used when we want to take three separate values and combine them to form a date. This will return the sequential serial number that represents a particular date.
year – This tear argument may contain 1 to 4 digits.
month – It is an integer representing the month of the year from 1 to 12 (January to December).
day- This integer represents the day of the month from 1 to 31.
- Go to cell C5.
- Write the DATE The formula will be:
- Now, press the Enter key.
- Pull the Fill Handle icon to the Cell C10.
- How to Remove Numbers from a Cell in Excel (7 Effective Ways)
- Remove Strikethrough in Excel (3 Ways)
- How to Remove Formulas in Excel: 7 Easy Ways
- Insert Timestamp in Excel When Cell Changes (2 Effective Ways)
- How to Automatically Insert Timestamp Data Entries in Excel (5 Methods)
3. Applying Text to Column Wizard in Excel
We will remove the timestamp from the date by applying Text to Column.
- First, select the dates in column C.
- Go to the Data tab.
- Select Data Tools from the commands.
- Select to Text to Columns.
- Select the Delimited and press Next.
- Now, select Space and then Next.
- Now, select the last two columns of the Data Preview option.
- Select Do not import column to skip them.
- Finally, press Finish.
Here, we see that the 12:00 AM timestamp is included.
- To remove this we select Short Date, shown in the below image.
- Finally, we get the date without a timestamp.
4. Use of Excel VBA Macros to Remove Timestamps
We will use VBA & Macro code to remove timestamps.
- Here, we will remove the timestamp from Column C.
- Go to the Developer tab.
- Select Macros from the command.
- Put the Remove_Timestamp on the Macro_name section.
- Then click Create.
- Write the below code on the VBA command module.
Sub Remove_Timestamp() Dim Rng As Range Dim WorkRng As Range On Error Resume Next xTitleId = "Date Range" Set WorkRng = Application.Selection Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8) For Each Rng In WorkRng Rng.Value = VBA.Int(Rng.Value) Next WorkRng.NumberFormat = "mm/dd/yyyy" End Sub
- Press F5 to run the code.
- Select the range in the Dialog Box.
- Then, press OK.
In this article, we described how to remove timestamps from date in Excel. I hope this will satisfy your needs. Please have a look at our website Exceldemy.com and give your suggestions in the comment box.