Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
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

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

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