Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to calculate minutes from hh:mm:ss

Hi,

is there a function to calculate from a time field like hh:mm:ss , the total minutes ?

I don't know how to do it

Help please

Thanks in advance for your help

3 Replies
pauljohansson
Creator III
Creator III

Hi,

Maybe you can use the functions hour and minute?

Example:

LOAD * INLINE [
    time
    15:10:33]
;


load
hour((time))*60  + minute(time) as TotalMinutes
resident t_time;

br

Paul

Anonymous
Not applicable
Author

I've two time stamp fields and I calculate the duration by  Interval(FinalTime - Starttime) and I get the correct value in hh:mm:ss. Now I would transform the result in minutes, but I'm getting wrong values.

I tried by hour and minute without success.

nagaiank
Specialist III
Specialist III

Did you try the interval function as given below?

Interval(Time#(FinalTime,'hh:mm:ss') -Time#(StartTime,'hh:mm:ss'),'mm')