Split an ISO Date-Time Value into Separate Cells in Excel
Question details
Extract the date and time from an ISO date-time text value into separate cells for sorting or analysis.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains values such as 2021-12-27T10:00:00+00:00, and the user wants separate date and time columns.
- Observed behavior
- The desired result is a date cell and a time cell that Excel can sort and analyze.
Check that the source values follow the same layout as 2021-12-27T10:00:00+00:00. The formulas below assume the first value is text in cell D2; change the cell reference if your data is elsewhere.
Extract the date and time with Excel formulas
Use formulas to create separate numeric date and time values that can be formatted, sorted, and analyzed.
In an empty cell such as E2, enter =DATE(LEFT(D2,4),MID(D2,6,2),MID(D2,9,2)).
In another empty cell such as F2, enter =TIMEVALUE(MID(D2,12,8)).
Select E2 and F2, then drag the fill handle down alongside the remaining values in column D.
Select the date results and choose a Date format from Home > Number Format. Select the time results and choose a Time format.

Split ISO date and time values in WPS Spreadsheet
Use date and time formulas in WPS Spreadsheet to turn an ISO date-time string into separate sortable cells.
- 1. Open the spreadsheet: Open WPS Spreadsheet and use File > Open to select the workbook containing the ISO date-time values.
- 2. Extract the date: If the first value is in D2, enter =DATE(LEFT(D2,4),MID(D2,6,2),MID(D2,9,2)) in E2.
- 3. Extract the time: Enter =TIMEVALUE(MID(D2,12,8)) in F2, then drag the fill handle down to copy both formulas to the remaining rows.
- 4. Format the columns: Select the date and time result columns in turn and use the number format options on the Home tab to apply Date and Time formats.

Frequently Asked Questions
Why do the extracted date and time appear as numbers?
Excel stores dates and times as numbers. Select the result cells and use Home > Number Format to apply a Date or Time format.
Do the formulas convert the time zone offset?
No. The time formula extracts the eight characters starting at position 12 and ignores the offset. A separate conversion is needed to adjust for a time zone.
Can I use Flash Fill instead of formulas?
Yes. In a new column, type an example date extracted from the first source value, select the cell below it, and use Data > Flash Fill. Repeat in another column for the time. Check whether the results are recognized as dates and times rather than text.
How do I sort by both the extracted date and time?
Select the data range, open Data > Sort, and sort first by the date column. Add a second sort level for the time column to order entries within each date.




