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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RBBB
Partner - Contributor
Partner - Contributor

Null date

Hello ,
I want to check that two dates are not null,
if both are not, I calculate the difference otherwise I put 0
This query only gives me 0

if( isnull([Due_Date]) or isnull([Days Open]),0 ,[Due_Date]-[Days Open])

4 Replies
vikasmahajan

Have try with following : 

len(trim(Due_Date))= 0   

Vikas

 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
RBBB
Partner - Contributor
Partner - Contributor
Author

Thank you for you answer but it doesn't work 

RBBB_0-1643707632801.png

 

vikasmahajan

Check with your date format

if ( len(trim(Due_Date))= 0  or isnull([Days Open]) , 0 ,

date(interval([Due_Date] - [Days Open],'D'),'YYYY/MM/DD')   )  as    "Days"

 

Please post sample data if it not works

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
RBBB
Partner - Contributor
Partner - Contributor
Author

it still doesn't work, I'm sorry I'm not able to share data with you because it's very confidential.
I can give you the date formats: 08/10/2021 08:42:54

and what I want to present:
in a bar chart I have an incident that I want to calculate their processing times