How to Fix Inconsistent Time Formats After Importing a CSV into Excel
Question details
Users experience inconsistent time formatting or alignment after importing CSV files into Excel because some entries are stored as text rather than valid time values.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing data from a CSV file into a spreadsheet.
- Observed behavior
- Time values appear with different alignments (often left-aligned) and inconsistent formatting because Excel recognizes them as text strings containing hidden spaces rather than numeric time data.
Before proceeding, visually inspect your imported time column to identify which cells are left-aligned, as this indicates they are currently being treated as text.
Use Text to Columns to Convert Text to Time Values
The Text to Columns feature is the quickest method to parse text strings into proper Excel time values without needing complex formulas.
This built-in tool forces Excel to re-evaluate the data in the selected column, effectively stripping out hidden formatting issues from CSV imports and converting text back into numbers or time values.
Highlight the entire column containing the inconsistent time values that you want to fix.
Navigate to the 'Data' tab on the ribbon and click on 'Text to Columns'.
Select 'Delimited' and click 'Next' twice to reach the final step of the wizard. Leave the column data format as 'General' and click 'Finish'.
With the column still selected, right-click and choose 'Format Cells'. Go to the 'Time' category and select a uniform time format (such as hh:mm or hh:mm:ss) to apply to all cells.

Use Formulas to Clean Extra Spaces and Convert to Time
If your time data contains persistent hidden spaces or non-printable characters, combining the TRIM and TIMEVALUE functions provides a thorough cleanup.
Easily Manage and Format CSV Data with WPS Spreadsheet
WPS Office provides powerful, easy-to-use tools to import CSV files, clean up text data, and format time values consistently. Enjoy a smooth data processing experience with complete format support.
- 1. Open CSV in WPS: Launch WPS Spreadsheet and open your CSV file directly.
- 2. Select the Time Column: Highlight the column that contains the inconsistent or text-formatted time data.
- 3. Convert Text to Time: Navigate to the 'Data' tab, select 'Text to Columns', and finish the wizard to convert the text to numbers.
- 4. Format Cells: Right-click the column, select 'Format Cells', and apply your desired Time format to unify the appearance.

Frequently Asked Questions
Why do some time values align to the left in Excel?
By default, Excel aligns text to the left and numbers (including dates and times) to the right. If a time value is left-aligned, it means Excel is reading it as text, often due to hidden spaces or formatting embedded during the CSV export process.
Can I prevent time formatting issues before importing a CSV?
Yes. Instead of opening the CSV directly by double-clicking it, use the 'Get Data' or 'From Text/CSV' feature found in the Data tab. This allows you to launch the Power Query Editor or Import Wizard to explicitly define the data type for each column before the data loads.
What does the TIMEVALUE function do?
The TIMEVALUE function takes a time represented as a text string and converts it into an Excel serial number. Because Excel handles dates and times as serial numbers, converting it allows you to accurately apply standard time formats and perform time-based calculations.




