How to Combine Date and Time in Excel (6 Easy Methods + Examples)

Combine Date and Time in Excel

Last updated on June 27th, 2025 at 03:50 am

Do you need to combine date and time in Excel into one column? Whether you’re creating timestamps, logging data, or building reports, it’s a common task. In this tutorial, you’ll learn how to combine date and time in Excel using 6 easy methods — from simple formulas to Power Query and VBA. Each method includes step-by-step examples with screenshots to help you choose the best one for your need.

In real-world scenarios, we often need to merge date and time in Excel when they are in separate cells.

Excel provides us multiple ways to concatenate date and time fields into one cell or format values with AM/PM.

In this guide, I will show you how to combine date and time in Excel using formulas, text functions, and formatting techniques.

By the end, you’ll know how to join dates and times and customize the output to suit your needs.

Let’s dive in.

Comparison of Methods to Combine Date and Time in Excel

MethodBest ForProsCons
Formula + FormatDynamic calculationEasy to updateFormatting can break
TEXT FunctionCustom displayControl over lookConverts to text
Text to ColumnsOne-time conversionNo formulas neededNot dynamic
VBAAutomationBatch processingRequires coding
Power QueryLarge datasetsReusable stepsSteep learning curve
Flash FillSmall tablesFast manual mergeNot for big data sets

Method 1: Combine Date and Time in Excel Using Addition

The easiest way to combine date and time is by adding the two values using a basic formula.

Suppose I have a date in cell A1 (e.g., “03/27/2025”) and a time in cell B1 (e.g., “2:30 PM”) and want to merge them.

Here’s how to do it:

Flowchart: Combine date and time

Enter the Formula:

In a new cell (e.g., C1), type:

=A1 + B1

Press Enter:

When I press the Enter button, it should show me the combined date and time, right? But it is showing me only the date. Why? Because the format of the C1 cell is not correct.

combine date and time not working

Let’s correct the format of the C1 cell.

Format the Cell:

  • Right-click on the cell
  • Select “Format Cells,”
  • Then choose “Custom.”
  • And enter a format like:
mm/dd/yyyy hh:mm AM/PM
Format cell mm/dd/yyyy hh:mm AM/PM

Now you will see the result as “03/27/2025 2:30 PM” in C1 cell.

Date and time display correct

Pro Tip: After merging, if your date or time isn’t displaying correctly, verify that source cells are formatted as “Date” and “Time” respectively.

Bonus Tip: If you ever need to do the reverse—separating date and time from a combined value—check out this guide on How to Separate Date and Time in Excel.

Method 2: Using the TEXT Function for Custom Formatting

If you don’t want to fall into formatting issues and need more control over how the combined result looks (e.g., with AM/PM or specific hour formats), you can use the TEXT function to concatenate the values.

Here’s how:

Flowchart: Combine date and time using TEXT function

Formula: In cell C1, enter:

=TEXT(A1, "mm/dd/yyyy") & " " & TEXT(B1, "hh:mm AM/PM")

Result: This formula will merge the date and time into a text string, like “03/27/2025 2:30 PM.” In this case, you do not need to format the C1 cell.

merge date and time using TEXT formula

Why Use This?

  • This is an ideal way when you want a readable output without performing calculations.
  • Also, you can tweak the format (e.g., “dd-mmm-yyyy h:mm” for “27-Mar-2025 14:30”).

Note: This method converts the result to text, so you can not use it for further date/time calculations unless you convert back to a number.

Related Tip: If you’re working with multiple columns and need to merge them efficiently, check out this guide on How to Combine Multiple Columns in Excel in VBA.

Method 3: Using CONCATENATE or CONCAT function

To merge date and time fields quickly, you can use the CONCATENATE function (Excel 2016 and earlier). In newer Excel versions, you can use the CONCAT function as well.

Let me show you an example:

CONCATENATE Formula:

=CONCATENATE(TEXT(A1, "mm/dd/yyyy"), " ", TEXT(B1, "hh:mm AM/PM"))
Flowchart: CONCATENATE function
Combine date and time using CONCATENATE function

Or, using CONCAT:

=CONCAT(TEXT(A1, "mm/dd/yyyy"), " ", TEXT(B1, "hh:mm AM/PM"))
Flowchart: CONCATE function
Combine date and time using CONCAT function

When to Use:

  • You can use these functions for basic merging. But sometimes, you need to format cells if Excel doesn’t recognize the result as a date-time value.

If you’re looking to merge more than just date and time, here’s a detailed guide on how to combine two columns in Excel.

Method 4: Combining Date and Time with Hour Precision

Sometimes, you only have a date and an hour value (e.g., “03/27/2025” in A1 cell and “14” in B1 cell for 2 PM). Is it possible to merge it?

Yes, here’s how to do:

Flowchart: join date and time with precision

Formula:

=A1 + (B1/24)

Here:

  • A1 contains the date (e.g., “03/27/2025”).
  • B1 contains the hour (e.g., “14”).
  • Dividing by 24 converts the hour into a time fraction.
Combining Date and Time with Hour Precision

Format C1 cell: Use “mm/dd/yyyy hh:mm AM/PM” to display “03/27/2025 2:00 PM.”

Use Case: You can use it for schedules or logs where time is recorded in hours.

You can also reverse this process if needed. Here’s how you can split text in Excel using different techniques.

Method 5: Using TEXTJOIN Function (For Excel 2019 & Later)

If you want to merge multiple date and time fields, you can use the TEXTJOIN function.

Let’s see how to use it when you have 3/27/2025 in A1 cell and 10:30 AM in B1 cell.

Flowchart: Combine date and time using TEXTJOIN

TEXTJOIN formula:

=TEXTJOIN(" ", TRUE, TEXT(A1, "mm/dd/yyyy"), TEXT(B1, "hh:mm AM/PM"))

This formula will merge A1 and B1 values, and C1 will be populated with the merged date and time like: 3/27/2025 10:30 AM.

CONCAT date and time using TEXTJOIN()

You can handle empty cells without error using this method. Also, it is efficient if you have a large dataset.

Method 6: VBA Macro to Automatically Merge Date and Time

For automation, you can use a VBA macro to combine date and time fields automatically.

Flowchart to run macro

Data before running macro:

date and time data before running macro

Macro Code:

Sub MergeDateTime()
    Dim ws As Worksheet
    Set ws = ActiveSheet
    Dim lastRow As Long
    lastRow = ws.Cells(Rows.Count, 1).End(xlUp).Row
    Dim i As Integer
    
    For i = 2 To lastRow
        ws.Cells(i, 3).Value = ws.Cells(i, 1).Value + ws.Cells(i, 2).Value
        ws.Cells(i, 3).NumberFormat = "mm/dd/yyyy hh:mm AM/PM"
    Next i
End Sub

How to Use:

  • Press Alt + F11 to open the VBA editor.
  • Insert a new module and paste the code.
  • Run the macro (Shortcut: Alt + F8) to merge date and time values.

Data after running macro:

Date and time data after running macro

Troubleshooting Common Issues

  • VALUE! Error: Ensure your date and time cells are in the correct format (not text). Use VALUE() to convert if needed.
  • Incorrect AM/PM: Double-check your time format in the source cell or formula.
  • Blank Cells: Add an IF condition, like:
=IF(AND(A1<>"", B1<>""), A1 + B1, "")

This prevents errors when fields are empty.

Advanced Tip for Power Users

  • Dynamic Timestamps: You can use =NOW() to insert the current date and time, then format it as needed.

Download the Free Practice Workbook

Ready to learn how to combine date and time in Excel? Download our free practice file to learn all six methods explained in this guide.

Try these methods on your dataset and let us know in the comments how it goes!

Frequently Asked Questions (FAQ)

Can I combine date and time without using formulas in Excel?

Yes, you can use custom formatting to display both values in a single cell without any formula. Select the cell, press Ctrl + 1, choose “Custom”, and use the format dd/mm/yyyy hh:mm:ss.

Why is my combined date and time showing as a number in Excel?

Excel stores dates and times as serial numbers. To display them properly, apply a date-time format using the Format Cells option (Ctrl + 1).

Which method should I use for large datasets?

Power Query or VBA is best for handling large data automatically, as they allow reusable and automated processing.

Leave a Reply

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