# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

## dates shows numbers and not number of days

Hi,

I have these date fields:

Date(ISSUE_DATE, 'DD/MM/YYYY')AS ISSUE_DATE1,

Date(CLOSED_DATE, 'DD/MM/YYYY')AS CLOSED_DATE1

and if i want to calculate the date with close date and issuedate i do this

closed_date - issue_date as daysBetweenDates

then i get a list with all numbers like this:

1,2323232

4,123123123123

3,241421414

how can i fix this, if i use this:

Interval(closed_date -issue_date ,'d') as daysBetweenDates

then it will work but if i make table to select all days from 30 till 40 days then the filter wont work..

Can anyone help me.

1 Solution

Accepted Solutions
Not applicable

## Re: dates shows numbers and not number of days

Hi nunununu  XD.

Maybe if you make :

Round(CLOSE_DATE)  - Round(ISSUE_DATE)  AS              DAYSBETWEENDATES

In case the data contains hour .

Check the QVW example.

4 Replies
MVP

## Re: dates shows numbers and not number of days

Didn't understand below

but if i make table to select all days from 30 till 40 days then it wont work in the interval field but it will work on the normal list with numbers.

Not applicable

## Re: dates shows numbers and not number of days

i first want to make a field for the amount of days so imagine you get a list box like this

1,

2,

3,

10,

11,

23,

234

and next to this i want to make a listbox which will get days like between 0 and 10 and between 10 and 20 etc..

so if i select between 10 and 20 then it will select here only 11.

how can i do this

MVP

## Re: dates shows numbers and not number of days

Create a List Box with below expression

=Dual(Replace(Class(daysBetweenDates,10),'<= x <','-'),Class(daysBetweenDates,10))

Go to sort tab and select Numeric Value Ascending..

Hope this helps..

Not applicable

## Re: dates shows numbers and not number of days

Hi nunununu  XD.

Maybe if you make :

Round(CLOSE_DATE)  - Round(ISSUE_DATE)  AS              DAYSBETWEENDATES

In case the data contains hour .

Check the QVW example.