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: 
Not applicable

No of dates calculation

Hi,

I need to calculate no of dates in new field. I made it as follows in script. But its not working. need your help......

LOAD *, Interval([LOSS_DATE]-12/31/2014) as 'DURATION';

Load * Inline 

LOSS_DATE

18-Jun-14

18-Jun-14

21-Jun-14

9-Jul-14

18-Jul-14

5-Jul-14

]; 

Thankz,

Dhanushka.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

RESULT

1.png

SCRIPT


SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';

LOAD *, date#([LOSS_DATE], 'DD-MMM-YY')-makedate(2014,12,31) as 'DURATION';

Load * Inline

[

LOSS_DATE

18-Jun-14

18-Jun-14

21-Jun-14

9-Jul-14

18-Jul-14

5-Jul-14

];

see here for detail

QlikView Date fields

View solution in original post

4 Replies
maxgro
MVP
MVP

RESULT

1.png

SCRIPT


SET MonthNames='jan;feb;mar;apr;may;jun;jul;aug;sep;oct;nov;dec';

LOAD *, date#([LOSS_DATE], 'DD-MMM-YY')-makedate(2014,12,31) as 'DURATION';

Load * Inline

[

LOSS_DATE

18-Jun-14

18-Jun-14

21-Jun-14

9-Jul-14

18-Jul-14

5-Jul-14

];

see here for detail

QlikView Date fields

its_anandrjs

You can try this also

LOAD *, Interval( date#([LOSS_DATE], 'DD-MMM-YY') - Date#('12/31/2014'),'d') as 'DURATION';

Load * Inline

[

LOSS_DATE

18-Jun-14

18-Jun-14

21-Jun-14

9-Jul-14

18-Jul-14

5-Jul-14

];

Regards

Anand

Not applicable
Author

Thank You very much.................

Not applicable
Author

Thank You Very Much.

Its also working....