Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Subbu55
Contributor
Contributor

How to calculate days in two values

 Hi All,

 

I have one requirement.

I have one date field is received date  and status field, in this status field two records 1. Pending 2. Accepted 

I want to calculate days in pending to accepted how many days taken.

 

Thanks in advance.

Regards,

Subba

Labels (6)
3 Replies
G3S
Creator III
Creator III

max({$<Status={'Accepted'}>}date(YOURDATEFIELD,'DD/MM/YYYY'))-max({$<Status={'Pending'}>}date(YOURDATEFIELD,'DD/MM/YYYY'))

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

@G3S I like your solution. But why the date() function?

date(YOURDATEFIELD,'DD/MM/YYYY')

Why not just YOURDATEFIELD?

-Rob

G3S
Creator III
Creator III

@rwunderlich Rob

if it is loaded as a date then no need for the function, but since I tried it as inline, I used the function.