# Qlik Sense App Development

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Creator III

## Timestamp interval problem

I'm trying to use the Interval function to get the difference in minutes between two timestamps, but the result is in error.  Here's the function I'm using in my load script:

Here's what the results look like:

 Month(Date) OrderType SalesOrder BeginLoadTimestamp EndLoadTimestamp MinutesToLoad May SO 21169443 5/30/2018 8:55:37 5/30/2018 8:58:12 0.00 May SO 21169414 5/30/2018 7:33:36 5/30/2018 7:33:37 0.00 May SO 21169344 5/30/2018 2:18:39 5/30/2018 2:19:26 0.00 May SO 21169342 5/29/2018 18:11:43 5/29/2018 18:11:56 0.00 May SO 21169191 5/29/2018 12:07:49 5/29/2018 12:08:14 0.00 May SO 21169175 5/29/2018 18:42:19 5/29/2018 18:42:19 0.00 May SO 21169139 5/29/2018 16:08:04 5/29/2018 16:58:59 0.04 May SO 21169123 5/29/2018 18:34:41 5/29/2018 21:38:01 0.13

Any ideas on how to get this work correctly?

Thanks.

1 Solution

Accepted Solutions
Highlighted
MVP

Try this

14 Replies
Highlighted
MVP

Try this

Highlighted
Creator III

Worked great.  Thanks!

Highlighted
Partner

Do you know how this can be done as an IF Statement, I basically need to convert the times in Minutes to particular phrases. I've tried.....

=If(Interval(TimeStamp#([End Time]) - TimeStamp#([Start Time]), 'm') = '90','Basic')

So I want any appointments that are 90 mins long to show as Basic.

The (Interval(TimeStamp#([End Time]) - TimeStamp#([Start Time]), 'm') formula works correctly and shows the length of each appointment in Min's but the if statement is blank.

Highlighted
MVP

May be try this

=If(Interval(TimeStamp#([End Time]) - TimeStamp#([Start Time]), 'm') = MakeTime(1, 30), 'Basic')

Highlighted
Partner

That works great, thank you!

Highlighted
Partner

I cant seem to get this to work with any other time lengths?

I.e. I though 30 mins would be (0,30) or (30)

And 2 hours would be (2,00)

Highlighted
MVP

It is... 30 Minutes = MakeTime(0, 30) and 2 hours is MakeTime(2)

Highlighted
Partner

Both return blanks :/. Am I missing something here.

Highlighted
MVP

I have no idea... may be share a sample