Excel: Merge Date and Time Cells Into One Cell With Formula

Formulas & functions · Updated November 19, 2026

To combine a date in A2 and a time in B2 into one Excel date-and-time value, enter =A2+B2 in C2, then format C2 to show both parts. This adds the values rather than merging the worksheet cells, so the result remains usable in date and time calculations.

How to combine date and time cells

Assume A2 contains a real Excel date, such as November 2, 2026, and B2 contains a real time, such as 2:30 PM. In C2, enter the formula below. The formula assumes the date is in A2 and the time is in B2; with the example values, it returns the combined date and time November 2, 2026 at 2:30 PM.

=A2+B2

  1. Select the cell where you want the combined result, such as C2.
  2. Type =A2+B2 and press Enter.
  3. Format the result to display a date and a time. If Excel shows a number or only one part, use the formatting steps below.

In Microsoft Excel for Microsoft 365 on Windows, you can copy the formula down by dragging the fill handle at the lower-right corner of C2. You can also select the cells to fill and press Ctrl+D. In Excel for Mac, use the fill handle or Command+D. Relative references adjust as the formula fills: the next row will use A3+B3.

Why adding the values works

Excel stores dates and times as numbers. In the standard date system, the whole-number portion represents a day, while the decimal portion represents a fraction of a day. A time of noon is one-half of a day; 6:00 AM is one-quarter. Adding a date value to a time value therefore creates a number containing both the calendar date and the time of day.

The formula does not physically move or combine the contents of A2 and B2. It calculates a new value in C2, while the original cells remain available. This distinction matters if you later need to sort, filter, subtract timestamps, calculate elapsed time, or use the result in another formula. Changing the display format affects how the number looks, not the underlying value.

Excel may initially display a serial number, a date without a time, or a time without a date. That does not necessarily mean the addition failed. It often means the result cell’s number format is set to show only part of the value. Apply a format that includes both date and time before troubleshooting the formula itself.

Choose a format that shows both parts

To set a custom display in Excel for Microsoft 365 on Windows, select the result cell or range and press Ctrl+1 to open Format Cells. Choose the Number tab, select Custom, enter a format such as yyyy-mm-dd hh:mm in the Type box, and select OK. The example displays a value such as 2026-11-02 14:30 using a 24-hour clock. On Mac, Command+1 opens Format Cells; the dialog provides the same kind of custom number format.

Choose a pattern that suits the people reading the worksheet. For example, use m/d/yyyy h:mm AM/PM for a compact 12-hour display, or dddd, mmmm d, yyyy h:mm AM/PM when a fuller date is useful. In a format code, hh displays a two-digit hour and mm displays minutes when it appears in the time portion. The exact appearance may vary with regional settings, but the stored value remains the same.

You can also choose a built-in date or time category in Format Cells, but many built-in date formats omit the time. A custom format is the clearest option when both components must appear together. If you only need a quick check, select the cell and look at the formula bar: formatting can hide details in the grid that are still present in the value.

Choose between a date-time value and display text

For most workbooks, use addition and apply a number format. The result stays numeric, so Excel can calculate durations, compare timestamps, and sort by actual date and time. For instance, subtracting an earlier combined timestamp from a later one gives an elapsed-time value that can be formatted as hours and minutes.

Sometimes the goal is a label for a report, export, or message rather than a value for more calculations. In that case, the TEXT function formats each input as text and joins them. This formula assumes a real date in A2 and a real time in B2; for November 2, 2026 and 2:30 PM, it returns the text 2026-11-02 02:30 PM.

=TEXT(A2,"yyyy-mm-dd")&" "&TEXT(B2,"hh:mm AM/PM")

Because that result is text, it does not behave like a date-time number in later calculations. Use it when the formatted appearance is the deliverable, not when the result must support time arithmetic. A useful rule is to keep the calculation result numeric in the data table and create a separate text version only when a fixed display is required.

When the source cells contain text

A cell can look like a date or time but contain text that Excel has not recognized as a numeric date or time. A common clue is that addition returns #VALUE!, or that changing the number format has no effect. Text imported from a website, a CSV file, or a system using different regional conventions can cause this problem.

If A2 contains recognizable date text such as Nov 2, 2026, and B2 contains recognizable time text such as 2:30 PM, you can convert the two inputs during the calculation. This formula assumes those text values are in A2 and B2; if Excel can interpret them under the computer’s regional settings, it returns the corresponding numeric date-time value.

=DATEVALUE(A2)+TIMEVALUE(B2)

DATEVALUE and TIMEVALUE depend on Excel being able to interpret the text. A date like 03/04/2026 can mean March 4 or April 3 in different regional settings, so do not assume an ambiguous imported string will convert as intended. Check the converted result against the source data, and, for recurring imports, standardize the source format or convert the columns before combining them. If the cells are already numeric date and time values, the simpler addition formula is preferable.

Handle a time that already includes a date

Check what is actually stored in each source column before adding them. A column labeled “time” may contain full timestamps, even if its cell format displays only the hour and minute. Adding that value to a separate date would add its date component too, potentially producing an unintended result.

If A2 contains the date to keep and B2 contains a full timestamp whose time portion you want, use the formula below. It assumes A2 is the desired date and B2 is a numeric date-time; with A2 set to November 2, 2026 and B2 set to November 3, 2026 at 2:30 PM, it returns November 2, 2026 at 2:30 PM.

=A2+MOD(B2,1)

MOD(B2,1) keeps the fractional part of B2, which represents its time of day, and leaves out its whole-number date portion. Format the result as a date and time as described above. If you are unsure whether B2 is a time-only value or a full timestamp, temporarily apply a general number format or inspect the source and formula bar before choosing how to combine it.

Common problems and checks

  • The result is a number: The calculation may be correct, but the cell is displaying the underlying serial value. Apply a date-and-time custom format.
  • The result shows only a date or only a time: The current number format is hiding the other component. Choose a format that includes both.
  • The formula returns #VALUE!: One or both inputs may be text. Check the cell contents and, if appropriate, convert recognizable text with DATEVALUE and TIMEVALUE.
  • The time seems to shift into another day: Check whether the time cell contains a full timestamp, a value above 24 hours, or a time entered with an unintended AM/PM setting.
  • The displayed time is unexpected: Confirm whether the source is stored as AM or PM and whether the selected format uses a 12-hour or 24-hour clock.

Also check for blanks and inconsistent rows before filling the formula down a large table. A blank date or time can produce a result that looks like a zero date, an unexpected time, or a partial value, depending on the other input and the cell format. If blank rows should remain blank, use an IF formula rather than assuming every row contains both components. For a simple table where either missing input should leave the output blank, with date in A2 and time in B2, use =IF(OR(A2="",B2=""),"",A2+B2). This returns a blank string when either input cell is empty; otherwise it returns their sum. Format the output column as date and time as usual.

Why Merge & Center is different

Excel’s Merge & Center command combines worksheet cells into a larger cell area; it does not combine a date value and a time value into a calculated timestamp. It is found on the Home tab in the Alignment group. If you select two cells containing separate values and merge them, Excel does not concatenate the contents. Merging can also leave only the upper-left cell’s content, so it is risky when both source values matter.

For date-and-time data, keep the date and time in separate columns if that makes entry or analysis easier, and calculate a combined value in another column. If the final worksheet needs only one visible column, you can hide the source columns after checking that dependent formulas still work. This preserves the original inputs and avoids using cell merging as a substitute for a formula.

Frequently Asked Questions

Can I combine date and time without a formula?
Yes, if the date and time are already parts of one value, you can change the cell’s number format to display both. When they are stored in separate cells, a formula such as =A2+B2 creates a combined value while keeping the originals intact.

Does changing the format combine the cells?
No. Formatting changes only how a value appears. It cannot combine two separate cells or turn a date in one cell and a time in another into a single calculated value; use addition for that.

Will the combined result update when I change the date or time?
Yes. A formula such as =A2+B2 recalculates when either referenced cell changes, provided Excel calculation is enabled. If you need a fixed result that will not change, copy the formula cells and use Home > Paste > Paste Values.

Can I sort or calculate with the combined result?
Yes, when you use addition and the source cells are numeric date and time values. The result is a numeric Excel date-time value. A result made with TEXT is text, so it is better suited to labels than calculations.

How do I keep the result but remove the formula?
Copy the result cells, then choose Home > Paste > Paste Values to replace formulas with their current values. Keep a copy of the original data if you may need to revise the inputs later.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.