Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time duration in IF statement

I am trying to create an IF statement in my load script that will identify whether a duration between two timestamps exceeded 45 minutes.

What I have tried is:

(resolved_at - "Opened time") * 24 as 'duration',

If('duration' <= 0.75, 'Met', 'Not Met') as 'SLA',

I have created a table and 'duration' correctly gives the number of hours (in decimal format) between the two timestamps. However, every entry has 'Not Met' in the 'SLA' field.

Clearly there is something incorrect with my number formatting. Any help would be greatly appreciated.

Conor

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Can you check this:

(resolved_at - "Opened time") as duration,

If(duration <= MakeTime(0, 45), 'Met', 'Not Met') as SLA

View solution in original post

1 Reply
sunny_talwar

Can you check this:

(resolved_at - "Opened time") as duration,

If(duration <= MakeTime(0, 45), 'Met', 'Not Met') as SLA