Data Import & Export

Convert CSV Date and Time Values to yyyy-mm-dd hh:mm in Excel

Camila MilosovichCamila Milosovich Nov 12, 2026 868 views

Question details

Convert CSV date-time entries formatted as mm/dd/yyyy hh:mm:ss AM/PM into real Excel date-time values and show them as yyyy-mm-dd hh:mm.

Convert CSV Dates to yyyy-mm-dd hh:mm in Excel
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
The user is importing a CSV file containing U.S.-formatted date and time values.
Observed behavior
Opening the CSV directly can cause Excel to interpret dates using the computer's regional settings instead of the CSV's U.S. locale.
Before you start

Confirm that the source column consistently uses the mm/dd/yyyy hh:mm:ss AM/PM pattern. Use Power Query to import the file rather than double-clicking the CSV, which applies automatic regional date parsing.

Solution 1Recommended

Import the CSV with Power Query and apply the English (United States) locale

Use this method when Excel may misread the month and day order while opening a CSV file directly.

Power Query lets you keep the column as text during import and then explicitly convert it with the en-US locale. This prevents ambiguous dates such as 04/05/2024 from being interpreted with the wrong date order.

1
Start a CSV import

In Excel, select Data > Get Data > From File > From Text/CSV, choose the CSV file, and select Transform Data instead of Load.

2
Keep the date column as text

In the Power Query Editor, select the date-time column. If it was detected as another type, select Transform > Data Type > Text.

3
Convert with the U.S. locale

With the column selected, choose Transform > Data Type > Using Locale. Set Data Type to Date/Time and set Locale to English (United States), then select OK.

4
Load the converted values

Select Home > Close & Load to return the converted date-time column to the Excel worksheet.

5
Apply the required display format

Select the imported cells in Excel, press Ctrl+1, choose Custom, enter yyyy-mm-dd hh:mm in the Type box, and select OK.

Import the CSV with Power Query and apply the English (United States) locale
Date values are now recognized correctly: The cells contain real date-time values, while the custom format controls how they are displayed.
Free Microsoft Office alternative

Work with CSV Data in WPS Spreadsheet

If you need a free and lightweight spreadsheet application for opening, reviewing, and editing CSV data, WPS Office provides a familiar spreadsheet workspace with a Microsoft Office-like interface. You can move existing workbook data to WPS Spreadsheet seamlessly and keep common Excel file formats compatible.

  1. 1. Open the CSV file: Launch WPS Spreadsheet and select Menu > Open to choose the CSV file.
  2. 2. Review the imported date column: Select the date-time column and verify that entries are displayed consistently before editing or exporting.
  3. 3. Save in an Excel-compatible format: Select Menu > Save As and choose Excel Workbook (*.xlsx) when you need to share the file with Excel users.
Open and edit CSV data in a lightweight spreadsheet workspace.Apply date and time cell formats when preparing imported data.Compatible with Microsoft Excel XLSX and XLS workbook formats.Familiar spreadsheet interface for users moving from Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel change the day and month when I open a CSV file?

Excel often uses your Windows or Microsoft 365 regional settings when opening a CSV directly. Import through Data > Get Data > From Text/CSV, then use Transform > Data Type > Using Locale and select English (United States).

What locale should I choose for dates written as mm/dd/yyyy with AM or PM?

Choose English (United States) and set the data type to Date/Time. This locale recognizes the month/day/year order and the 12-hour AM/PM time notation.

How do I remove seconds from imported CSV date-time values without changing the actual date?

After loading the data, select the cells, press Ctrl+1, choose Custom, and enter yyyy-mm-dd hh:mm. This hides seconds in the display while retaining the underlying date-time value.

Can I refresh the CSV later without repeating the locale conversion?

Yes. When the locale conversion is saved as a Power Query step, use Data > Refresh All to reload the CSV and apply the same en-US Date/Time conversion automatically.