Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

marksmunich
Contributor II

find the difference of dates

Hallo Qlik community,

I have 2 diferent date fields, I have calculate the max of date field and min of other date field. now the Problem is i want to find the difference between These 2 fields.

for example I am using the following formula, but is not returning the right date.

differencetime=interval((max(Enddate)),(min(Startdate)))

any suggestions.

Tags (3)
4 Replies
yousef_am
Contributor II

Re: find the difference of dates

you can find the different by converting the date fields to numbers by using max(date(Enddate))-min(date(Startdate))

Re: find the difference of dates

interval(max(Enddate)-min(Startdate))

venkatasreekant
Valued Contributor

Re: find the difference of dates

Hi,

You can use this formula,

=Num(Max(Date(Date,'DD/MM/YYYY'))- Min(Date(Date,'DD/MM/YYYY')),'###')

Re: find the difference of dates

Interval(Max(EndDate)-Min(StartDate),'dd')

Community Browser