Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

1 Solution

Accepted Solutions
Not applicable

Re: How to get processed time?

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

10 Replies
Not applicable

Re: How to get processed time?

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

Re: How to get processed time?

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

Re: How to get processed time?

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

Re: How to get processed time?

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

MVP
MVP

Re: How to get processed time?

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

Re: How to get processed time?

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

MVP
MVP

Re: How to get processed time?

Hi,

Try like this

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


Regards,

Jagan.

Not applicable

Re: How to get processed time?

Ahyel,


Is your question answered ?

Fabrice

Not applicable

Re: How to get processed time?

Hi Fabrice,

Yup   Thanks so much for clarifying

Best regards,

Ahyel

Community Browser