Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Not applicable
Author

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
Not applicable
Author

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'

Not applicable
Author

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

Not applicable
Author

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