Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing two dates to eachother

Hello I want to see the difference in days between two dates. They are formated as ex 2008-03-18 00:00:00 and I have set the the numberformating to YYYY-MM-DD hh:mm:ss, when I use teh expression first.date-second.date it is not working. What to do?

/J

3 Replies
Not applicable
Author

Hi,

please see the attached example.

Are you sure that your dates are interpreted as numbers and not as characters?

Good luck!

Rainer

Not applicable
Author

Hello

I have got the comparison to work but I am having troubles with counting the numer of items orders that have a difference in time.

count(if(date#([Leveransprecision.Bokat datum]-[Leveransprecision.Lovat leveransdatum],'DD')<>0), Leveransprec_KEY)

Something is wrong but I don't know what. And instead of Leveransprec_KEY I could use just "1" cause I want to increase the number by one when there is a difference

Thanks in advance

/J



Not applicable
Author

Hi,

please upload a short example (*.qvw).

Than it´s much more easier to find a solution.

Thank you!

Rainer