Qlik Community

QlikView Integration

Discussion Board for collaboration on QlikView Integration.

satheshreddy
Contributor 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
payalgosar
Contributor II

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

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.

2 Replies

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

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

payalgosar
Contributor II

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

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.

Community Browser