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

how to calculate count of days between two days

Hello All,

I have two days,m i need to calculate count of days between those dates in qliksense

for example,

if i have today(), orderdate,

i have order date is 01-04-2015, today() is 15-04-2015,

the difference between two dates is 15days, how to get this count?

Thanks in advance

Regards,

Sreeharsha V

1 Solution

Accepted Solutions
goncalo_ricardo_pereira
Partner - Contributor III
Partner - Contributor III

Hello,

You can try something like this:

fabs(Interval(OrderDate - Today(),'d'))

The function "Interval", gives you the difference between the two dates in days. The function "Fabs", make sure that the result is always > 0.

Best Regards,

Gonçalo Pereira

View solution in original post

3 Replies
Not applicable
Author

=today() - order_date should work.

Another example.put this expression in the textbox and check

=Today() - makedate(2015,1,1) // Returns 103

Not applicable
Author

Please try:

=ceil(OrderDate - Today())

goncalo_ricardo_pereira
Partner - Contributor III
Partner - Contributor III

Hello,

You can try something like this:

fabs(Interval(OrderDate - Today(),'d'))

The function "Interval", gives you the difference between the two dates in days. The function "Fabs", make sure that the result is always > 0.

Best Regards,

Gonçalo Pereira