Text into date format

Tocix

New Member
Joined
Apr 17, 2016
Messages
39
Office Version
  1. 365
Please help me out converting numbers into date format in column O

Text
THS100219
THS092719
THS091819
THS080719

into
10/02/19
09/27/19
09/18/19

I tried format cell into date. it does not work.


Thanks
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Try this formula:
Code:
=DATE(RIGHT(A1,2),MID(A1,4,2),MID(A1,6,2))
 
Upvote 0
THS100219 into 10/2/1919
OK, to make it "2019", try this variation instead:
Code:
=DATE("20" & RIGHT(A1,2),MID(A1,4,2),MID(A1,6,2))

THS080719 should be 08/07/19 but it return as #VALUE instead.
I cannot recreate that error, it works fine for me.
Make sure that your formula is referencing the correct cell.
If it still doesn't work, check for extra characters in your entry.
So, if your entry is in cell A2, this formula:
=LEN(A2)
should return 9. If it returns a bigger number, you have extra characters in that cell.
 
Upvote 0
OK, to make it "2019", try this variation instead:
Code:
=DATE("20" & RIGHT(A1,2),MID(A1,4,2),MID(A1,6,2))


I cannot recreate that error, it works fine for me.
Make sure that your formula is referencing the correct cell.
If it still doesn't work, check for extra characters in your entry.
So, if your entry is in cell A2, this formula:
=LEN(A2)
should return 9. If it returns a bigger number, you have extra characters in that cell.


Thank you very much. Second code works perfectly.
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,148
Members
448,552
Latest member
WORKINGWITHNOLEADER

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