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?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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)
 
Last edited:
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=--TEXTJOIN("/",,MID(A2,5,2),MID(A2,3,2),LEFT(A2,2))
 
Upvote 0
@mohadin Have you tested either of your suggestions. ;)

@grahamward Could you have dates that are in the year 2000 or since?
 
Upvote 0
Sorry
Try this One
Excel Formula:
=RIGHT(LEFT(A1,6),2)&"/"&MID(LEFT(A1,6),3,2)&"/"&19&19&LEFT(LEFT(A1,6),2)

Excel Formula:
=RIGHT(LEFT(A1,6),2)&" "&TEXT(MID(LEFT(A1,6),3,2)*29,"mmmm")&" "&19&19&LEFT(LEFT(A1,6),2)
 
Upvote 0
Still not sure why you have the &19 in there twice.
 
Upvote 0
Excel Formula:
=RIGHT(LEFT(A1,6),2)&"/"&MID(LEFT(A1,6),3,2)&"/"&19&LEFT(LEFT(A1,6),2)


VBA Code:
=RIGHT(LEFT(A1,6),2)&" "&TEXT(MID(LEFT(A1,6),3,2)*29,"mmmm")&" "&19&LEFT(LEFT(A1,6),2)
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

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