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

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:MM:SS AM or PM). I get result in days like this ####.##############,

but I would like to have result like this : DDD:MM:SS (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

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

How about:

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

or

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

And if that does not work:

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

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

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