3 Replies Latest reply: Apr 15, 2015 6:15 AM by Goncalo Pereira

# 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?

Regards,

Sreeharsha V

• ###### Re: how to calculate count of days between two days

=today() - order_date should work.

Another example.put this expression in the textbox and check

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

• ###### Re: how to calculate count of days between two days

=ceil(OrderDate - Today())

• ###### Re: how to calculate count of days between two days

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