Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
prachi91
Creator III
Creator III

total days in between two dates

hello

how to find total days in between two dates?

thank you

6 Replies
craigsutton
Creator
Creator

Since dates are stored as dual both number and date, you can subtract the end date from the start get and use the floor function to get total number of days between two dates.

Floor(Num(DateEnd-DateStart))

prachi91
Creator III
Creator III
Author

thanks craig..

i come to know one thing, i have only one date field and want find total sales between two date ?

vishsaggi
Champion III
Champion III

You mean your End date should be something like Today()?

sergio0592
Specialist III
Specialist III

You can enter your dates in variables (V_Start_date, V_End_date) with two input box.

Expression=sum({<[Sales date]={">=$(=Start_date) <=$(=End_date)"}>}  Sales)

prachi91
Creator III
Creator III
Author

yes

vishsaggi
Champion III
Champion III

You want this in Script? Just extending Craig's expression you can try like:

Num(Floor(Today() - StartDate)) AS DaysDiff