Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ashmitp869
Creator II
Creator II

help in qlikvie script - where date dif is use

Hi there ,

please assist with the qlikview script :

view:
Load
[Key],
iif((DATEDIFF(minute,[checkin_dt],[Doctor Seen DateTime]) >=0 and ([DecisionToAdmit] is not null)),DATEDIFF(minute,[checkin_dt],[Doctor Seen DateTime]),null) as [Presentation to Doctor (Minutes)]
resident tmp;

Hw to write it in Qlikview load script

Labels (1)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

view:
Load
[Key],
if( NUM(INTERVAL([checkin_dt]-[Doctor Seen DateTime] ,'mm' ))>=0 and NOT ISNULL([DecisionToAdmit]) , NUM(INTERVAL([checkin_dt]-[Doctor Seen DateTime] ,'mm' )), null) as [Presentation to Doctor (Minutes)]
resident tmp;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

view:
Load
[Key],
if( NUM(INTERVAL([checkin_dt]-[Doctor Seen DateTime] ,'mm' ))>=0 and NOT ISNULL([DecisionToAdmit]) , NUM(INTERVAL([checkin_dt]-[Doctor Seen DateTime] ,'mm' )), null) as [Presentation to Doctor (Minutes)]
resident tmp;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
ashmitp869
Creator II
Creator II
Author

Hi Vineeth,

As I have null value in the field - I am getting the below error -( attached img.PNG)

Is there any way to handle this in script .?

 

 

vinieme12
Champion III
Champion III

My bad,  replace null with null() 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.