Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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_pereira
New Contributor III

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

3 Replies
Not applicable

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

Not applicable

Re: how to calculate count of days between two days

Please try:

=ceil(OrderDate - Today())

goncalo_pereira
New Contributor III

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

Community Browser