ID Number to birthday date

grahamward

New Member
Joined
Jul 18, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi Forum. I have a database of ID (social security) numbers, which also represent the persons birthdate. For example the ID number 6803126300186, would mean that the persons birthday is 12 March 1968. Would anyone know how to extract this from Excel, so that a date can be displayed for multiple ID numbers?
 
Hi
How about
12/03/1968
VBA Code:
=RIGHT(C1,2)&"/"&MID(C1,3,2)&"/"&19&19&LEFT(C1,2)
Or
Excel Formula:
=RIGHT(C1,2)&" "&TEXT(MID(C1,3,2)*29,"mmmm")&" "&19&19&LEFT(C1,2)
Thank you very much. Will give it a go.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Ok, in that case try the formulae in post#3 & post#9
 
Upvote 0
Hi Mohadin. The formula you gave worked. Thank you. The problem is that I cannot sort the text in date order. Any suggestions to solve this?
 
Upvote 0
Excel Formula:
=DATE(19&LEFT(LEFT(A1,6),2),RIGHT(LEFT(A1,6),2),MID(LEFT(A1,6),3,2))
 
Upvote 0
That still does not take into account that some dates will be in the 2000s.
Phuoc's formula in post#9 is the only one that is reliable as mine will return 2029 is the 1st two digits are 29
 
Upvote 0
Another option

Excel Formula:
=--TEXTJOIN("/",,MID(A2,{5,3,1},2))
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,593
Members
449,038
Latest member
Arbind kumar

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