Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
satheshreddy
Creator III
Creator III

how to find out EXP in between Join-date and Relive-date ?

Hi All,

am new to qlikview can any one give exp to me for Exp?

    

EMPJOINDATERELEVEDATEEXP
AA19-03-201122-04-2014
BB23-03-201121-03-2015
CC21/3/201224-08-2016
DD20-03-201223-06-2015
EE28-04-201522-09-2016

I need EXP Details In Qlikview in Straight Table.

Regards

Sathish

1 Solution

Accepted Solutions
Anonymous
Not applicable

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.

View solution in original post

2 Replies
marcus_sommer

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

Anonymous
Not applicable

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.