Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help For convert date, i need help urgent

Hello my friends,

I have two dates, in my expression.

([26/10/2009 11:56:00] - 23/10/2009 9:32:00) = 3.08999999.

This dates is 2 results of sql, change according to the type of reference I use

I need to bring the result as follows, 3 days 2 hours and 24 minutes. And when you have case that less than one day, bring me 0 days, many hours. How do such conversion. Grateful

3 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

you can´t format a timestamp this way. You can make a two section stringlike

floor(X) & ' days ' & time(frac(x),'hh:mm')

Anonymous
Not applicable
Author

Try interval function:
interval (timestamp1 - timestamp2, 'D hh:mm')

Not applicable
Author

Hello friend, can do with the interval to run the maximum value, but I need to get the lower range of dates as well

=

Interval(MAX(DATA_PROD - DATA_BAIXA), 'D')&' Dias '&

hour

(MAX(DATA_PROD - DATA_BAIXA))&' Horas '&

minute

(MAX(DATA_PROD - DATA_BAIXA))&' Minutos '



=

day(sum(aggr(min((([DATA_PROD]) - ([DATA_BAIXA]))),CODIGO_ESTAGIO,REFERENCIA)))&' '& 'DIAS'&' '&

Hour

(sum(aggr(min((([DATA_PROD]) - ([DATA_BAIXA]))),CODIGO_ESTAGIO,REFERENCIA)))&' '& 'Horas'&' '&

Minute

(sum(aggr(min((([DATA_PROD]) - ([DATA_BAIXA]))),CODIGO_ESTAGIO,REFERENCIA)))&' '& 'Minutos'