TextToColumns Date Conversion Fails for June, July and September

chonc76

New Member
Joined
Mar 30, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Running Excel 365 Version 2401.

I've tried to import a sheet with text dates and used the TextToColumns (Delimited, Date Format) to convert and I noticed not all dates converted. Upon further testing I created a column of 2 years worth of dates in the format month-day-year eg, January-01-2023. I then copied to a text editor (Windows formatting, UTF-8) and pasted back to a clean sheet. Upon conversion as described above all dates converted except for dates in June, July and September which remain "general"; all other dates convert to "date" format.

Any help appreciated.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
In the last step in text-to-columns you can set a format for each column.

Even better is import via Power Query where you can set data types (even with locale) before loading to the worksheet.
 
Upvote 0
In the last step in text-to-columns you can set a format for each column.

Even better is import via Power Query where you can set data types (even with locale) before loading to the worksheet.
Yes, that was done with MDY but like I said it doesn’t convert the months specified.
 
Upvote 0
"I did but I’m not looking for alternative way more interested why the TTC function isn’t working."

I thought the TTC would work until I tried it.
You didn't request a workaround but I included one. N.B. If the months were all 3 characters like Jan TTC would work.
This was with a system using International Date format dd-mm-yy. If USA Regional settings do not work try MONTH(TEXTBEFORE(A2:A12,"-")&"-1")

Dates and Time 2024.xlsm
AG
1
2January-01-202301-Jan-23
3February-01-202301-Feb-23
4March-01-202301-Mar-23
5April-01-202301-Apr-23
6May-01-202301-May-23
7June-01-202301-Jun-23
8July-01-202301-Jul-23
9August-01-202301-Aug-23
10September-01-202301-Sep-23
11November-01-202301-Nov-23
12December-01-202301-Dec-23
13
2h
Cell Formulas
RangeFormula
G2:G12G2=DATE(RIGHT(A2:A12,4),MONTH(1&TEXTBEFORE(A2:A12,"-")),RIGHT(TEXTBEFORE(A2:A12,"-",-1),2))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,174
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top