Convert to date using Text to Columns

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I have dates like the one below. I saw video on how to covert them using text2columns. So I used it and went to delimiter (unchecked all) then next page, I select Date, then select different date formats.
I got not consistent result. The only result was correct when I select YMD format. I have a feeling YMD is only one accepted because my date is for example 20211116 (which is yyyymmdd) so in Text 2 columns
I have to select YMD format to match my date. Am I right? By the way my computer/excel date is DD/MM/YYYY.

aadvanced - all.xlsm
ABCDE
4DateMDYDMYYMDYDM
520210111#######2021011111/01/202101/11/2021
620210206#######2021020606/02/202102/06/2021
720211011#######2021101111/10/202110/11/2021
820210809#######2021080909/08/202108/09/2021
920210522#######2021052222/05/2021#################
1020211116#######2021111616/11/2021#################
text2no
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Text To Columns doesn't convert dates to a specific format, rather, it recognizes if a value can be construed to match the specified date ordering and, if so, converts that value to a real date.
 
Upvote 0
Use the formula or Text to Columns "YMD"
Format the dates to your preference

Date and Time 2021.xlsm
ABCDE
1Date TextDateDate TextText to Columns
22021011111-Jan-212021011111-Jan-21
3202102066-Feb-21202102066-Feb-21
42021101111-Oct-212021101111-Oct-21
5202108099-Aug-21202108099-Aug-21
62021052222-May-212021052222-May-21
72021111616-Nov-212021111616-Nov-21
6a
Cell Formulas
RangeFormula
B2:B7B2=--TEXT(A2,"0000-00-00")
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,447
Members
448,898
Latest member
drewmorgan128

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