Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Ive got a problem with age selection and i hope that someone here can help me with it.
In my datawarehouse ive got the attribute BirthDateTTime (format: Aug 30 1965 12:00AM)
now i want to exclude people younger than 7 years old
can someone tell me how i can make this expression?
qvw file is uploaded
HI
Please check the attached file..
use timestamp() instead of timestamp#()
Hope that helps
Thank you for helping out, but have you seen that it still doesnt give the right selection? the result for a birthdate in 2012 is the same as the result for 1890 for example.
Change the expression into this:
if (round(num(today()) - num(Timestamp(CUSTOMER_BirthDTTM))) <=(7*365),'Y','N')
you can also use the age function try the expression:
if(age(BirthDateTTime) < 7, .....)
hey i forgot smth in the age function. he is the correction:
if(age(today(),BirthDateTTime) < 7, ....)
The solution.
Variable: age (today(),BirthDateTTime) (AS Age_exp)
Expr: if($(AGE_exp) <=7 ,1,0)
Thanks! i had to make a variable first though before it started working.