Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
am new to qlikview can any one give exp to me for Exp?
EMP | JOINDATE | RELEVEDATE | EXP |
AA | 19-03-2011 | 22-04-2014 | |
BB | 23-03-2011 | 21-03-2015 | |
CC | 21/3/2012 | 24-08-2016 | |
DD | 20-03-2012 | 23-06-2015 | |
EE | 28-04-2015 | 22-09-2016 |
I need EXP Details In Qlikview in Straight Table.
Regards
Sathish
Hi,
It seems the dates which you have is not in consistent and correct date format.
In your load script you need to convert "JOINDATE" and "RELEVEDATE" in date format.
E.g.
Table:
LOAD EMP,
alt( date#( JOINDATE ,'DD-MM-YYYY' ), date#( JOINDATE , 'DD/MM/YYYY' )) as JOINDATE,
alt( date#( RELEVEDATE ,'DD-MM-YYYY' ), date#( RELEVEDATE , 'DD/MM/YYYY' )) as RELEVEDATE;
LOAD * INLINE [
EMP, JOINDATE, RELEVEDATE
AA, 19-03-2011, 22-04-2014
BB, 23-03-2011, 21-03-2015
CC, 21/3/2012, 24-08-2016
DD, 20-03-2012, 23-06-2015
EE, 28-04-2015, 22-09-2016
];
Please find attached the example for same.
You could use: RELEVEDATE - JOINDATE to get the difference between them in days. To convert this into month you could use an approach like this one: How Do I Get the Number of Months Between Two Dates?
- Marcus
Hi,
It seems the dates which you have is not in consistent and correct date format.
In your load script you need to convert "JOINDATE" and "RELEVEDATE" in date format.
E.g.
Table:
LOAD EMP,
alt( date#( JOINDATE ,'DD-MM-YYYY' ), date#( JOINDATE , 'DD/MM/YYYY' )) as JOINDATE,
alt( date#( RELEVEDATE ,'DD-MM-YYYY' ), date#( RELEVEDATE , 'DD/MM/YYYY' )) as RELEVEDATE;
LOAD * INLINE [
EMP, JOINDATE, RELEVEDATE
AA, 19-03-2011, 22-04-2014
BB, 23-03-2011, 21-03-2015
CC, 21/3/2012, 24-08-2016
DD, 20-03-2012, 23-06-2015
EE, 28-04-2015, 22-09-2016
];
Please find attached the example for same.