Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Calculate between date/time field and system time

Hi,

I am trying to set a calculated expression on a straight chart.  I have a date/time field called logdate in the following format (dd/mm/yyyy hh:mm:ss), and I want to be able to calculate the currently system time in the same format against the logdate field.  This should then show me the duration of when a call was logged to the current time. 

Do you know what code I need to run?

Regards,

Jon Ditchfield

1 Solution

Accepted Solutions
Highlighted
Not applicable

Hi!!

Try

if(call_status_ful = 'Pending' or call_status_ful = 'Unaccepted' or call_status_ful = 'Off Hold' or call_status_ful = 'Unassigned', time#(Now(1)-logdate,'hhh:mm'))

Rebeca

View solution in original post

3 Replies
Highlighted
Not applicable

Also I forgot to mention and to make things more complicated, I only want this to be viewable on the straight chart if the field called call_status_full = 'Pending', 'Unaccepted', 'Off Hold' or 'Unassigned'

Highlighted
Not applicable

Hi!!

Try

if(call_status_ful = 'Pending' or call_status_ful = 'Unaccepted' or call_status_ful = 'Off Hold' or call_status_ful = 'Unassigned', time#(Now(1)-logdate,'hhh:mm'))

Rebeca

View solution in original post

Highlighted
Not applicable

Thanks for your help Rebecca, I have merged the code you gave me with another one I have which gives me the desired results.