Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

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

Thanks in advance

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

This should give you the answer I believe:

Days360

View solution in original post

8 Replies
ChennaiahNallani
Creator III
Creator III

try in script

Floor(Enddate )-Floor(Startdate) as Days

petter
Partner - Champion III
Partner - Champion III

This should give you the answer I believe:

Days360

Ivan_Bozov
Luminary
Luminary

How about this: Interval(Enddate-Startdate)/30

vizmind.eu
manoj217
Creator III
Creator III

interval function will work.

it will shows the time between the two dates

manoj217
Creator III
Creator III

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

mahitham
Creator II
Creator II
Author

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

mahitham
Creator II
Creator II
Author

The below expression is working fine

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

petter
Partner - Champion III
Partner - Champion III

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