Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

morenoju
Contributor III

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.

Tags (2)
1 Solution

Accepted Solutions

Re: Time format m:ss

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

2 Replies

Re: Time format m:ss

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
Contributor III

Re: Time format m:ss

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.

Community Browser