Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is the best way to convert an timestamp value to the amount of minutes.

Hi,

I have an application where I calculate the interval between 2 timestamps.

The interval values can vary from a couple of minutes to a couple of days.

In my script  I Have the following:

Interval(TimeStamp(JOB_END_DATE, 'DD-MM-YYY hh:mm:ss') - ApplyMap('Map.Melding.Moment_verstuurd', JOB_NR, '-'),'mm') as TestInterval

With this I have the amount of minutes. However, I need to calculate with that number, so how can i convert it to a number for calculating the average for example?

I've tried to use the Minute and Hour method. But this doesn't give the correct value.

6 Replies
simondachstr
Luminary Alumni
Luminary Alumni

How about using something like this: num(timestamp#()).

MK_QSL
MVP
MVP

NUM(YourExpressionShowingMin)

MarcoWedel

(JOB_END_DATE-ApplyMap('Map.Melding.Moment_verstuurd',JOB_NR, '-'))*1440

Not applicable
Author

why without the interval method?

MarcoWedel

Because it's the shortest expression I can think of to calculate a number representing the Humber of minutes within an Interval.

Can you provide sample data and expected results to compare the solution ?

Thanks

Regards

Marco

MarcoWedel

Please mark as answered if there are no further questions.

Thanks

Regards

Marco