Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
MayHello,
I have tried to find an answer to my question, but I can not find any good solution. Maybe someone can help me?
Our SSN# is 11 digits and the first six numbers is our birthdate. Eks. DDMMYYXXXXX.
How can I easily find the age from this SSN#? Is it possible?
Is it even possible to find a solution if a person is born March 1. 2001? SSN# will be 010301XXXXX
I am so very greatful for a little help with this challenge
THANK YOU in advance!
🙂
Best regards
Anita
,
Ah I see, looks like you have a couple of issues going on here, the leading zero dropping and also the year being interpreted as this century. Please see attached, I have had to create a new field in your excel to define the century for each SSN, as you could have a mix in there.
hope that helps
Joe
Date(Date#(Left(SSN#,6),'DDMMYY')) as YourDateField
Then if you want age from this, you can just use
Age(today(),Date(Date#(Left(SSN#,6),'DDMMYY'))) as YourAgeField
Thank you for trying to help, but it does not give me the right result..
When the SSN# begins with a '0' the results in age is -.
When the SSN# begins with 1-9, the results is 44 for all the emplyees 🙂
Any other tips?
Maybe the formats then try
Age(Date(today(),'DDMMYY'),Date#(Left(SSN#,6),'DDMMYY'))
failing that post up the example and can then take a better look
Thank you again for trying to help, but I am sorry, it still does not work.
I have tried to simplify my data, I hope you understand 🙂
Se Attached files .xls (with the SSN#) and .qvw
How can I find the right age? 🙂
Ah I see, looks like you have a couple of issues going on here, the leading zero dropping and also the year being interpreted as this century. Please see attached, I have had to create a new field in your excel to define the century for each SSN, as you could have a mix in there.
hope that helps
Joe
Hello Anita,
I've found a solution, be it through a pass-by.
100:
LOAD * inline [ number
010196-48911
010262-44699
130388-46781
130449-30794
210154-28721
210186-45383
210255-47974
210284-34909
210379-38391
210479-39760
210556-38958
210576-45900
];
200:
LOAD*,
2014-year2 as age;
LOAD*,
year&right(date,2) as year2;
LOAD *,
if(right(date,2)<= 15 ,20, 19) as year;
LOAD *,
date#(left(number,6),'DDMMYY') as date
Resident 100;
drop table 100;
Kind regards,