Excel Formulas to Split Date and Time Separated by Space

📅 Oct 03, 2026 📝 Sarah Miller

Manually separating combined date and time stamps in Excel remains a persistent headache for data analysts. While standard funding sources and enterprise databases frequently export transactional logs with unified, rigid timestamps, parsing them is critical for clean reporting. Masterfully splitting these variables grants users complete visual control over their timelines.

As a brief stipulation, Excel stores dates as whole numbers and times as fractional decimals, meaning a simple text split isn't always best. Using mathematical functions like INT and MOD serves as the industry standard to cleanly isolate each element. Below, we provide the precise formulas and formatting steps to seamlessly divide your date and time data.

Excel Formulas to Split Date and Time Separated by Space

Excel Formula to Split Date and Time with Space: A Comprehensive Guide

When working with datasets exported from databases, CRMs, or external system logs, you will frequently encounter combined date and time stamps in a single cell, separated by a space (for example, 2023-11-15 14:30:00). While this format is highly efficient for data storage, it can complicate analysis, sorting, filtering, and the creation of Pivot Tables.

To analyze this data effectively, you often need to split the date and time into two distinct columns. Fortunately, Microsoft Excel offers several robust formulas and techniques to achieve this. Depending on whether your datetime stamps are stored as true Excel serial numbers or as text strings, the approach will differ. In this guide, we will explore every scenario and provide the exact formulas you need.


Understanding How Excel Stores Dates and Times

Before jumping into the formulas, it is crucial to understand Excel's underlying logic. Excel does not see dates and times the way we do. Instead, it uses a unified numeric system:

  • Dates are stored as whole numbers (integers) representing the number of days since January 1, 1900. For instance, the date January 1, 2024 is stored as the serial number 45292.
  • Times are stored as decimal fractions of a 24-hour day. For example, 12:00 PM (noon) is exactly half of a day, represented as 0.5. 6:00 AM is represented as 0.25.
  • Combined Date and Time values are stored as decimal numbers. For example, 2024-01-01 12:00:00 is represented numerically as 45292.5.

Knowing this makes splitting true datetime values remarkably simple using basic math. However, if your data was imported as raw text, you must use text-manipulation functions instead. We will cover both scenarios below.


Method 1: Splitting True Numeric Date and Time Values

If your combined date and time is stored as a true Excel numeric value, you can split them using high-performance mathematical formulas. This is the cleanest and most efficient method.

1. Extracting the Date Using the INT Formula

Because the date is the integer portion of the serial number, you can strip away the decimal (the time) using the INT (Integer) function. This function rounds a number down to the nearest integer.

=INT(A2)

How to apply it:

  1. Assuming your combined datetime is in cell A2, enter =INT(A2) in cell B2.
  2. Press Enter. You may see a raw serial number or a date.
  3. To display it correctly, select cell B2, go to the Home tab, and in the Number Format dropdown, select Short Date.

2. Extracting the Time Using the MOD Formula

To extract the time, you need to isolate the decimal fraction of the serial number. The easiest way to get the decimal remainder of a division operation is by using the MOD function, dividing the value by 1.

=MOD(A2, 1)

How to apply it:

  1. In cell C2, enter the formula =MOD(A2, 1).
  2. Press Enter. This returns the decimal remainder.
  3. Format cell C2 as Time (e.g., hh:mm AM/PM or HH:mm:ss) via the Home tab's Number Format dropdown.

Alternatively, you can subtract the integer date from the combined datetime value: =A2 - INT(A2). Both formulas yield the exact same result.


Method 2: Splitting Date and Time Stored as Text

If your date and time data is formatted as text (often aligned to the left of the cell by default), the mathematical INT and MOD functions will return a #VALUE! error. In this case, you must locate the space character separating the date and time, and split the string accordingly.

1. Extracting the Date (Text-to-Date Conversion)

To extract the date from a text string, we use the LEFT function to pull characters from the left up to the space character. We use the FIND function to dynamically locate the position of the space.

To ensure Excel treats the resulting text as an actual date, wrap the formula in the DATEVALUE function:

=DATEVALUE(LEFT(A2, FIND(" ", A2) - 1))

How it works:

  • FIND(" ", A2) finds the position of the space. If the space is at character 11, it returns 11.
  • LEFT(A2, 11 - 1) extracts the first 10 characters from the left (which is the date portion).
  • DATEVALUE(...) converts that text string into a serial date number that Excel can format and use in calculations. Ensure you format this destination cell as a Short Date.

2. Extracting the Time (Text-to-Time Conversion)

To extract the time portion from the right side of the space, we use the RIGHT and LEN (Length) functions. Wrap the result in TIMEVALUE to convert it to a true Excel time serial number:

=TIMEVALUE(RIGHT(A2, LEN(A2) - FIND(" ", A2)))

How it works:

  • LEN(A2) calculates the total character length of the cell.
  • LEN(A2) - FIND(" ", A2) calculates exactly how many characters exist after the space.
  • RIGHT(...) extracts that specific number of characters from the right side of the text string.
  • TIMEVALUE(...) converts the resulting text string (e.g., "14:30:00") into a true decimal time value. Remember to format the cell as Time.

Method 3: The Modern Excel Way (Excel 365 & 2021+)

If you are using modern Excel (Microsoft 365 or Excel 2021), you have access to simplified text-manipulation functions: TEXTBEFORE and TEXTAFTER. These formulas are far more intuitive than legacy nested functions.

Extracting Date with TEXTBEFORE

=VALUE(TEXTBEFORE(A2, " "))

This formula grabs everything before the first space. Wrapping it in VALUE ensures that Excel converts the extracted text back into a numeric serial number, which you can then format as a Short Date.

Extracting Time with TEXTAFTER

=VALUE(TEXTAFTER(A2, " "))

This formula extracts everything after the space. The VALUE function converts the output to an Excel decimal time serial number. Format the cell as Time to view it correctly.


Summary of Formulas and Use Cases

Data Type Target Output Formula Required Formatting
Numeric Datetime Date =INT(A2) Short Date
Numeric Datetime Time =MOD(A2, 1) Time (hh:mm)
Text Datetime (Legacy) Date =DATEVALUE(LEFT(A2, FIND(" ", A2)-1)) Short Date
Text Datetime (Legacy) Time =TIMEVALUE(RIGHT(A2, LEN(A2)-FIND(" ", A2))) Time (hh:mm)
Text Datetime (Excel 365) Date =VALUE(TEXTBEFORE(A2, " ")) Short Date
Text Datetime (Excel 365) Time =VALUE(TEXTAFTER(A2, " ")) Time (hh:mm)

Troubleshooting & Best Practices

1. Handling "Double Spaces"

Sometimes, raw data exports contain double spaces between the date and the time (e.g., 2023-11-15  14:30:00). This can break standard FIND and text-splitting formulas. To fix this, wrap your reference cell in the TRIM function, which eliminates duplicate internal spaces:

=INT(TRIM(A2)) or =TEXTBEFORE(TRIM(A2), " ")

2. Fixing the #VALUE! Error

If your numeric formulas (INT or MOD) return a #VALUE! error, your source column is stored as text. Switch to the text formulas (Method 2 or 3). Conversely, if your text formulas return errors, your dates are likely numeric; use Method 1 instead.

3. Preserving Raw Data

When writing formulas to split data, keep your original combined datetime column intact. If you plan to delete the original column later to save workbook space, first copy your new Date and Time columns, right-click, and select Paste as Values. This removes the formulas and leaves only the static, calculated outputs.

Conclusion

Splitting date and time strings separated by a space in Excel is a straightforward process once you know the state of your source data. Whether you use mathematical tricks like INT and MOD for serial numbers, robust text parsing functions like LEFT and FIND, or modern Excel functions like TEXTBEFORE and TEXTAFTER, mastering these formulas will significantly accelerate your data prep and cleanup workflows.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.