Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
morenoju
Partner - Specialist
Partner - Specialist

Time format m:ss

Hi,

Do you know if I can use something like time(Time#(traveltime,'s'),'m:ss')) so the result of an expression is shown in minutes:seconds instead of as a decimal number?

I thought I had use something like that successfully in other occasions, but now for some reason every time I try to do the conversion I get a zero as a result.

My expression is currently looking like this:

Sum({<[link.id]={'255500','255480','255460'}>}

Aggr(Avg({<[link.id]={'255500','255480','255460'},link_YearMonth={"$(=Date(AddMonths(Today(),-1),'YYYY-MM'))"},link_WeekDay-={'Sat','Sun'},PeakPeriodId={'1'}>}traveltime/60),[link.id]))

So the result is 7.3. I'd like to see something like 7:20.

Thanks much.

1 Solution

Accepted Solutions
sunny_talwar

How are you converting 7.3 to 7:20? Do you may be need 7:18? If yes, you can try this

=Interval(7.3/(60*24), 'm:ss')

Capture.PNG

View solution in original post

2 Replies
sunny_talwar

How are you converting 7.3 to 7:20? Do you may be need 7:18? If yes, you can try this

=Interval(7.3/(60*24), 'm:ss')

Capture.PNG

morenoju
Partner - Specialist
Partner - Specialist
Author

First of all, yes, I was referring to 7:18, to the m:ss format, in any case.

And I like a lot the use of the Interval function as you propose it. Easy to add it and works great. Appreciated.