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

minutes to time format

I  got data in minutes(eg 100, 200, 500) i need to convert it to the following format

ah:bmin (eg 5h:20min, 3h:40min).

I tried using interval function

interval(avg([min])/1440,'hh:mm').

I am having 2 problems

1. This expression is executing in chart level, but throwing an error when i use it in the script.

2. I  am getting the output as aa:bb(05:20, 03:40)

1 Solution

Accepted Solutions
Gysbert_Wassenaar

1. If you use avg in a load statement then you need to add all the other fields that are not aggregated in a GROUP BY clause.

2. Try =subfield(interval(avg(min)/1440,'h:mm'),':',1) & 'h' & subfield(interval(avg(min)/1440,'h:mm'),':',-1) & 'min'


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

1. If you use avg in a load statement then you need to add all the other fields that are not aggregated in a GROUP BY clause.

2. Try =subfield(interval(avg(min)/1440,'h:mm'),':',1) & 'h' & subfield(interval(avg(min)/1440,'h:mm'),':',-1) & 'min'


talk is cheap, supply exceeds demand
Not applicable
Author

Just as i needed, Thanks mate,