Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm using a csv file as my source data. The DOB range from 1/2/1951 to 9/17/1992 in the source data but when I create a table it ranges from 7/10/1971 to 6/11/2070. I checked the table view in DM but it shows future dates too.
Try like this
Load *, Year(DOB1) as YearDOB;
Load *,
Date(If(Right(DOB, 2) >= Right(Year(Today()),2), MakeDate(1900+Right(DOB,2), Left(DOB,2),Mid(DOB, 4,2)), ALt(Date(DOB, 'DD/MM/YYYY'), Date(Date#(DOB, 'MM/DD/YY'),'MM/DD/YYYY')))) as DOB1
From ursource;
In excel, you have MM/DD/YYYY format, but in Qliksense, DOB has MM/DD/YY format. If you are using Year(DOB) in front end, might be, Qlik recognize, values are in 20K instead of 19K.
Can you bring Year of DOB in script, instead of in front end.
Like
Load *, Year(DOB) as Year from yoursource;
Hope it helps.
Can you please send sample data to verify?
Hi @MayilVahanan,
Here it is
Try like this
Load *, Year(DOB1) as YearDOB;
Load *,
Date(If(Right(DOB, 2) >= Right(Year(Today()),2), MakeDate(1900+Right(DOB,2), Left(DOB,2),Mid(DOB, 4,2)), ALt(Date(DOB, 'DD/MM/YYYY'), Date(Date#(DOB, 'MM/DD/YY'),'MM/DD/YYYY')))) as DOB1
From ursource;
@MayilVahanan Thank you very much! It worked 😁