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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get processed time?

Hi,

May I ask how to do the script to get the processed time for the following data below?

I wanted to get the processed time from Task received time to processed time. The condition is if Processed time-task received time<=15 minutes it is within SLA, otherwise over SLA..

Thank you!!

Regards,

-Ahyel

OFR.JPG.jpg

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Ahyel,

if (Interval(Time#(Time2)-Time#(Time1))<=1/24/4, (Interval(Time#(Time2)-Time#(Time1)), sth else)

1 is 1 day

1/24/4 is 15 minutes

Fabrice

View solution in original post

10 Replies
Not applicable
Author

Hi,

Try this in your load script:

LOAD ...

if(Action='PROCESSED', Interval(Time#(Time2)-Time#(Time1)) ) as Duration

....

Please adapt the field names to your model

Fabrice

Not applicable
Author

Hi Aunez,

Thanks for this. But how about the condition of if time2-time1<=15 minutes it is within SLA otherwise, Over SLA?

Thanks again

- Ahyel

Not applicable
Author

Ahyel,

if (Interval(Time#(Time2)-Time#(Time1))<=1/24/4, (Interval(Time#(Time2)-Time#(Time1)), sth else)

1 is 1 day

1/24/4 is 15 minutes

Fabrice

Not applicable
Author

Hi Aunez,

Okay. Can I ask how 1/24/4 become 15 minutes? Is this a standard format of time for Qlikvew?

Thank you so much!

Regards,

-Ahyel

jagan
Partner - Champion III
Partner - Champion III

Hi,

1/24 is 1 day has 24 hours and 1/24 gives you 1 hour

(1/24)/4 - Gives you 15 minutes (1 hour = 60 mins, 60/4 = 15)


Hope this helps you.

Regards,

jagan.


Not applicable
Author

Yes it is a standard of QlikView

1 is 1 day. Today (05 MAR 2014) is 41 703  (the dates are stored like that in QV)

Today, 12:00 is 41 703,5  (half day = 0,5)

Today, 18:00 is 41 703,75

etc.

1 is 1 day

1 minute is therefore: 1/24/60

15 minutes are therefore : 15/24/60 or 1/24/4 (because 4 times 15 minutes per hour)

Fabrice

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

if (Interval(Time#(Time2)-Time#(Time1), 'mm')<=15,


Regards,

Jagan.

Not applicable
Author

Ahyel,


Is your question answered ?

Fabrice

Not applicable
Author

Hi Fabrice,

Yup   Thanks so much for clarifying

Best regards,

Ahyel