8 Replies Latest reply: Aug 17, 2018 8:14 AM by Petter Skjolden

# How to calculated Number of days

Hi Experts,

Can any one please help me to calculate below Days column from start date and end date by using below excel

calculation in Qlik

Days = DAYS360(Startdate,Endate)/30

Startdate          Enddate              Days(Expected output)

01/01/2018      31/03/2018           3.00

01/04/2018     30/06/2018            2.97

• ###### Re: How to calculated Number of days

try in script

Floor(Enddate )-Floor(Startdate) as Days

• ###### Re: How to calculated Number of days

This should give you the answer I believe:

Days360

• ###### Re: How to calculated Number of days

The below expression is working fine

=(((YEAR(Date2)*12 + MONTH(Date2)) - (YEAR(Date1)*12 + MONTH(Date1))) * 30) + DAY(Date2) - DAY(Date1))/30

• ###### Re: How to calculated Number of days

Yes - Stephen Redmond usually get it right....

• ###### Re: How to calculated Number of days

interval function will work.

it will shows the time between the two dates

• ###### Re: How to calculated Number of days

But you have to mention in which format you want to show the value in output, use num function

• ###### Re: How to calculated Number of days

Hi Manoj

I have checked Interval () but its not working getting like below

Startdate          Enddate              Days(Expected output)           by interval getting below values

01/01/2018      31/03/2018           3.00                                          2.97

01/04/2018     30/06/2018            2.97                                          3.00