How to Separate Date and Time in Excel: 6 Best Mathods

How to Separate Date and Time in Excel

Ever Wondered How to Separate Date and Time in Excel?

Excel is a powerful tool for managing data, but sometimes dates and times come combined in a single cell, making it tricky to work with them separately.

Whether you’re analyzing timestamps or organizing schedules, splitting date and time into separate columns can simplify your workflow.

In this article, I will explore multiple methods—using formulas, with Text to Columns, Power Query, VBA Macro, Flash Fill, and more—to help you separate date and time effortlessly in any sheet.

Why Separate Date and Time?

When a timestamp like “03/26/2025 14:30” sits in one cell, it’s stored as a single value in Excel. However, splitting it into a date (03/26/2025) and a time (14:30) in separate columns allows for better sorting, filtering, and calculations.

Let’s dive into the methods.

Method 1: Separate Date and Time Using Formulas

This is one of the easiest and most flexible ways to split date and time from one cell. Excel has a built-in function, INT, that can extract these components.

Flow chart to separate date and time
Separate Date and Time using formulas. Flowchart image by author.

Steps:

Step 1: Identify Your Data:

Assume your timestamp is in cell A1 (e.g., “01/15/2025 14:30”).

Identify data
Combined date and time. Image by Author.
Example Data Before separating date and time:
Column AColumn BColumn C
1/15/2025 14:30??
3/22/2025 9:15??
6/10/2025 18:45??
3/15/2023 7:39??
7/21/2021 13:15??
12/6/2024 23:54??
Example Data to split date and time from one column.

Step 2: Extract Date From One Cell

  • In a new cell (e.g., B1), enter this formula:
=INT(A1)
  • This removes the time portion and leaves the date. Format B1 cell as a date (e.g., “mm/dd/yyyy”).
Separate date in excel
Extract date from date and time. Image by Author.

Step 3: Extract Time From One Cell

  • In another cell (e.g., C1), Use this formula:
=A1-INT(A1)
  • This isolates the time. Format C1 cell as a time (e.g., “hh:mm”).
Separate time in excel
Split time from date and time. Image by Author.

Step 4: Apply the same formula in the remaining cells

  • Copy Down: Drag both formulas down the column to apply them to more rows.
Drag the separate date and time formula to the remaining rows. Image by Author.
Data after separating date and time:
Column AColumn BColumn C
1/15/2025 14:301/15/20252:30
3/22/2025 9:153/22/20259:15
6/10/2025 18:456/10/20256:45
3/15/2023 7:393/15/20237:39
7/21/2021 13:157/21/20211:15
12/6/2024 23:5412/6/202411:54
Separated date and time from one column.

How It Works:

Excel stores dates and times as numbers. It stores dates as a whole number and time as a decimal in the A1 cell. The INT function will chop off the decimal (time) and leave the date in the B1 cell. While subtracting the integer isolates the time in the C1 cell.

Dragging B1 and C1 cell formulas will apply the same formula to the remaining cells.

Method 2: Using Text to Columns

If your timestamp has a space between the date and time (e.g., “03/26/2025 14:30”), Excel’s Text to Columns feature is a quick shortcut—no formulas needed!

The Text to Columns feature not only helps in separating date and time but also works great for splitting text. Check out this guide on how to Split Text in Excel for more details.

Flow chart to use text to columns
Using the Text to Columns feature. Flowchart image by Author.

Steps:

Steps 1: Select the Column with Date-Time Values

  • Select & highlight the column with your timestamps (e.g., A1:A6).
Select date-time values
Example data. Image by Author.

Step 2: Open Text to Columns Wizard

  • Go to the Data tab > Text to Columns (or use the shortcut: Alt + A + E) to open the convert text to columns wizard window.
Open the Convert Text to Column Wizard dialog box.
Open the Convert Text to Column Wizard dialog box. Image by Author.

Step 3: Choose the Separation Method

  • Select “Delimited” and click Next.
Select delimited
Select Delimited option. Image by Author.

Step 4: Set the Delimiter

Choose Space as the delimiter (if date and time are separated by a space) and click Next.

select space delimiter
Select the Space checkbox. Image by Author.

Step 5: Set destination to split date and time

  • Choose where to place the split data (e.g., =$B$1:$C$6) and click Finish.
Set destination to split date and time
Choose a destination. Image by Author.

Step 6: Verify the separated date and time

When you click on the finish button, the separated date and time will be populated in C and D columns, respectively. Verify if there is any error after date and time separation.

Verify data after separating date and time
Verify the Separated date and time. Image by Author.

After splitting, format the new columns as “Date” and “Time” to ensure proper display.

Quick Tip: This method works best if the date and time are consistently formatted with a space.

Method 3: Separate Date and Time With a Single Formula (TEXT())

For a more advanced approach, you can use specific functions like TEXT to split date and time with a formula in one go.

Flow chart to demerge date and time using TEXT() function
Separate date and time using the TEXT() function. Flowchart Image by Author.

Steps:

Suppose you have a date and time in the A1 cell like 07/19/2025 22:30:15

date-time data example
Date-Time in a single column. Image by Author.

Now, let us see step-by-step how to extract the date and time and populate it in separate columns.

Step 1: Separate Date

  • In cell B1, enter:
=TEXT(A1,"mm/dd/yyyy")
  • This pulls just the date (i.e., 07/19/2025) as text.
split date from date and time
Pull date from date-time cell. Image by Author.

Step 2: Extract Time

  • Enter the following formula in cell C1:
=TEXT(A1,"hh:mm")
  • This isolates the time (i.e., 22:30:15) as text.
isolate time from date and time
Isolate time from date-time cell. Image by Author.

Step 3: Convert to Values (Optional):

  • If you need proper date/time values (not text), copy the results, paste as values, and reformat the cells.

Note: This method is great for display purposes but may require extra steps for calculations.

Method 4: Separate Date and Time Using VBA Function

VBA Macro is a powerful option if you need to automate the separation process for a large dataset.

VBA macro process flow chart
Separate date and time using VBA Macro. Flowchart image by Author.

Steps:

Example Data before split:

Column A (Date-Time)Column BColumn C
05/12/2025 08:20:10??
09/25/2025 17:50:45??
12/31/2025 23:59:59??
Example date-time date before detach.
data of date & time to isolate
Example data before the disconnect date-time. Image by Author.

Step 1: Open the VBA Editor

  • Press Alt + F11 to open the VBA editor.
  • Click Insert → Module.

Step 2: Add the VBA Code

Sub SplitDateTime()
    Dim ws As Worksheet
    Dim lastRow As Long
    Dim i As Long
    
    Set ws = ActiveSheet
    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row 'Find last row
    
    For i = 2 To lastRow 'Assuming data starts from row 2
        ws.Cells(i, 2).Value = Int(ws.Cells(i, 1).Value) 'Extract Date
        ws.Cells(i, 3).Value = ws.Cells(i, 1).Value - Int(ws.Cells(i, 1).Value) 'Extract Time
    Next i
    
    ws.Columns(2).NumberFormat = "mm/dd/yyyy"
    ws.Columns(3).NumberFormat = "hh:mm:ss AM/PM"
End Sub

Step 3: Run the VBA Macro

  • Select the column with date-time values.
  • Run the SplitDateTime macro (Alt + F8 → Select SplitDateTime → Run).
  • The date will appear in column B, and the time in column C.

Date Result After Running VBA:

Column A (Date-Time)Column BColumn C
05/12/2025 08:20:1005/12/202508:20:10
09/25/2025 17:50:4509/25/202517:50:45
12/31/2025 23:59:5912/31/202523:59:59
Unconnected date and time example data
split date and time VBA macro result
Break up the date-time into two columns from one. Image by Author.

Note: This VBA function works dynamically and can be applied to large datasets.

We can use a VBA Macro to Combine Two Columns and find and replace text as well.

Method 5: Using Power Query (Best for Large Datasets)

Power Query provides a dynamic way to separate date and time automatically.

Steps:

Step 1: Select Data Column

  • Click on the column that contains date-time values.
  • Go to Data → Get & Transform → From Table/Range.
  • Create table prompt will open. Ensure your data has headers and click OK.
Flowchart: Detach date-time using Power Query.
Detach date-time using Power Query. Flowchart diagram image by Author.
Select data to separate using power query
Create a table. Image

Step 2: Open Power Query Editor

  • The Power Query Editor window will open with your selected data.
Open Power Query diagram.
Open Power Query. Flowchart image by Author.

Step 3: Isolate the Date

  • Click on the Date-Time column.
  • Go to Add Column → Date → Date Only.
Flowchart image: Isolate the date.
Isolate the date. Flowchart image by Author.
Extract date using power query.
Steps to split date using Power Query. Image by Author.
  • A new column will be created with just the date.
date extracted
Date separated. Image by Author.

Step 4: Extract the Time

  • Click on the Date-Time column again.
  • Go to Add ColumnTimeTime Only.
Flowchart: Isolate the time.
Isolate the time. Flowchart image by Author.
Select time only to split.
Steps to split time. Image by Author.
  • This will create another column with only the time.
time column added
Time separated. Image by Author.

Step 5: Close & Load the Data

  • Click Close & Load to apply the changes.
  • The data will now appear in Excel with separate date and time columns.
Close and load
Load power query data in sheet
Close and load Power Query. Image by Author.

The extracted date and time will be populated as below.

Extracted date and time
Separated date and time. Image by Author

Tip: Power Query is ideal for large datasets as it updates dynamically when new data is added.

Method 6: Using Flash Fill (Quickest Method) – Step-by-Step

Flash fill flow chart to separate date and time in ms excel
Using Flash Fill to Split date and time. Flowchart image by Author.

Steps:

Step 1: Manually Enter the First Date

  • In column B (or another column), type the date from the first row manually (e.g., 5/12/2025).
Type date manually for flash fill
Example data to split by Flash Fill. Image by Author.

Step 2: Manually Enter the First Time

  • In column C, type the time from the same row (e.g., 8:20:10 AM).
Type time manually for flash fill
Split date and time from date-time cell. Image by Author.

Step 3: Use Flash Fill for the Date Column

  • Click on the next cell in column B (below the first manually entered date).
  • Press Ctrl + E (Flash Fill shortcut).
Flash fill date using Ctrl + E
Use shortcut Ctrl + E to flash fill. Image by Author.
  • Excel will automatically fill in the rest of the dates.
Separated date using flash fill
Detach date. Image by Author.

Step 4: Use Flash Fill for the Time Column

  • Click on the next cell in column C.
  • Press Ctrl + E again.
Flash fill time using Ctrl + E
Detach time. Image by Author.
  • Excel will extract and fill the time values for all rows.

Quick Tip: If Flash Fill doesn’t work, ensure that the original data format is consistent and recognized by Excel.

Bonus Tips

  • Check Your Data: If your timestamps lack a space, Text to Columns won’t work—stick to formulas.
  • Combine Methods: Use Text to Columns to split initially, then refine with formulas for specific formatting.
  • Formatting Matters: Always adjust the cell format (Right-click > Format Cells) after splitting to match your needs.

Which Method Should You Use?

  • Using a formula: Best for dynamic updates when your data changes.
  • With Text to Columns: Ideal for quick, one-time splits from one cell.
  • Shortcut lovers: Text to Columns is faster if you’re comfortable with delimiters.
  • Using Power Query (best for large datasets and automation)
  • Using Flash Fill (best for quick, small datasets)
  • Using a VBA function (best for automation and large datasets)

By mastering these techniques, you’ll have full control over your timestamps in Excel. Try them out on your next sheet and see which works best for your data!

Choose the method that fits your workflow and improve your Excel sheet management.

Ready to learn how to separate date and time in Excel? Download this Excel practice file with pre-filled data and test each technique step by step!

Do you have any other Excel tips you’d like to learn? Let us know in the comments!

Leave a Reply

Your email address will not be published. Required fields are marked *