Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Difference between 2 dates


I have 2 date fields in the format

question_date eg : jun-25-2011

answer_date eg:    jul-01-2011

i need to find the difference between 2dates , in above case 6 days ...how do i write this in an expression.

2 Replies
Not applicable

Difference between 2 dates


I have solve this problem in the script with the expression:

answer_date - question_date AS difference

Maybe you have to try

num(answer_date) - num(question_date) AS difference

if you converted the date field into the format 'jun-25-2011'.



Not applicable

Re: Difference between 2 dates


      PFA. I have used mapping function to map Month names to numeric values i.e Jan is 1, Dec is 12 . Then created the dates in M/D/YYYY format using makedate() function. You may then apply logic for subtracting the two dates as needed. Hope this helps.


Community Browser