Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

duransva
New Contributor

Expression of time (today+1 - date)

Hi,

I would like ask for help with this example:

Calculation of time from today to start date (YYYY-MM-DD HH:MMSmiley FrustratedS AM or PM). I get result in days like this ####.##############,

but I would like to have result like this : DDD:MMSmiley FrustratedS (days, minutes, seconds).

Is it possible to do it in simple way e.g.  getTime = (today+1 - date),  DDD HH.MM.SS instead of decimal number in days

Thank

Svatava

Tags (1)
3 Replies
MVP
MVP

Re: Expression of time (today+1 - date)

How about:

=Interval((today() + 1 - date), 'DDD:mm:ss')

or

=Interval((today() + 1 - date), 'd:m:ss')

MVP
MVP

Re: Expression of time (today+1 - date)

And if that does not work:

=Int(today() + 1 - date) & ':' & Floor(Frac(today() + 1 - date) * 1440) & ':' &

Mod(Floor(Frac(today() + 1 - date) * 86400), 60)

duransva
New Contributor

Re: Expression of time (today+1 - date)

Hi,

=Interval((today() + 1 - date), 'd:m:ss')

It works perfect only I missed hours but this = Interval((today(2) + 1 - Opened), 'ddd hh:mm:ss') works perfect. Thanks

Br.

Svatava