# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Contributor

## shelf life

i have two columns of date

a                                 b

13/7/2017           13/7/2018

i want to show shelf life as b-a = 365

what should i do?

1 Solution

Accepted Solutions

## Re: shelf life

use
interval(b-a,'D')

Regards,
Great dreamer's dreams never fulfilled, they are always transcended.
6 Replies
Honored Contributor II

## Re: shelf life

1:
a, b
13/7/2017, 13/7/2018
];

NoConcatenate
2:
Load *, date#(b,'DD/MM/YYYY')-date#(a,'DD/MM/YYYY') as shelf Resident 1; DROP table 1;

## Re: shelf life

use
interval(b-a,'D')

Regards,
Great dreamer's dreams never fulfilled, they are always transcended.
Contributor

## Re: shelf life

 24-06-2017 24-06-2018 30/12/1900

interval(date#(B,'DD-MM-YYYY')-date#(A,'DD-MM-YYYY'),'D')

i tried your solution but now its not showing me as 365 output in 3rd column.

## Re: shelf life

provided solution must work. can you describe what are the steps you are trying? where are you trying?

post your script and chart expression

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
MVP

## Re: shelf life

Remove the date format for the result column. 30/12/1900 is the date representation of the number 365.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Contributor

## Re: shelf life

yes it worked thanx