Discussion board where members can get started with QlikView.
First of all, there are some functions to use with dates, such as Age() that returns the number in years between two dates and Class() that returns the classification of a value regarding the parameters passed. It would be useful if you told us what do you want to get based on yoru EFFDATE field. What does those "-" signs in your script mean? Are they there on purpose?
well, EFFDATE field means the effective date and "-" is a substraction ,our purpose in this function is to get the age brackets field for example the field is : age bracket and the values are : 0-17 ,18-35 ... so in this function we substract EFFDATE or the effective date from the DOB witch means the date of birth
to get the age brackets.
Check the following and adapt it to your own data and field names
LOAD Date(EFFDATE) AS EFFDATE,
Date(Date#(DOB, 'DDMMMYYYY')) AS DOB,
Age(Date(EFFDATE), Date(Date#(DOB, 'DDMMMYYYY'))) AS AGE,
If(Age(Date(EFFDATE), Date(Date#(DOB, 'DDMMMYYYY'))) <= 60, '<=60', If(Age(Date(EFFDATE), Date(Date#(DOB, 'DDMMMYYYY'))) > 65, '66-Above', '61-65')) AS AgeGroup
Although this is loading INLINE (hardcoded values) you can use any other source.
Hope that helps.