Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Days Calculation

Hello,

I need to calculate the difference between 2 dates in the script below what I have a fields:

Assessment Date                   Submitted Date                    

6/30/2017                                   7/28/2017

the output field should be 21 Days "6/30/2017 - 7/28/2017 = 28 Days"

hope you can help thank you

Labels (1)
3 Replies
Frank_Hartmann
Master II
Master II

Date(Date#([Submitted Date],'MM/DD/YYYY'),'MM/DD/YYYY')-Date(Date#([Assessment Date],'MM/DD/YYYY'),'MM/DD/YYYY') as Days

hope this helps

sunny_talwar
MVP
MVP

If your date fields are read as dates by qlikview, all you need is to do this

[Submitted Date] - [Assessment Date]

For help with reading dates correctly, read these guys

Why don’t my dates work?

QlikView Date fields

Get the Dates Right

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Mario,

Maybe it will help you:

Num(Date(Date#([Submitted Date],'MM/DD/YYYY'),'MM/DD/YYYY'))-num(Date(Date#([Assessment Date],'MM/DD/YYYY'),'MM/DD/YYYY')) as Days



Thanks,

Arvind Patil