Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

QlikView date format for elapsed times

Hi,

I'm trying to show an elapsed time (timestampB - timestampA) and I have troubles getting with the correct format to use for values greater than a day. For example, if the elapsed time is 26 hours and 15 minutes I'll like to show "26:15:00" or "1 02:15:00". In Windows the format is "[ h ]:mm:ss" but it doesn't work in QlikView. Any ideas?

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

QlikView date format for elapsed times

Did you try interval function?

interval(timestampB - timestampA, 'hh:mm:ss')
OR
interval(timestampB - timestampA, 'DD hh:mm:ss')

4 Replies
mov
Esteemed Contributor III

QlikView date format for elapsed times

Did you try interval function?

interval(timestampB - timestampA, 'hh:mm:ss')
OR
interval(timestampB - timestampA, 'DD hh:mm:ss')

MVP
MVP

QlikView date format for elapsed times

To follow up on that a little, time() is used for clock times. It will never show more than 24 hours because there are only 24 hours on a clock. Interval() is used for elapsed time, which can obviously be more than 24 hours.

Not applicable

QlikView date format for elapsed times

Thanks! It works.

martin_cevela
New Contributor II

Re: QlikView date format for elapsed times

Hi John,

I have tried both interval cases and I'm getting the same results - it is probably due to the mentioned fact that interval function measures the elapsed time and therefore 'DD hh:mm:ss' format can't be interpreted correctly.

However, if I do need to show this format and use the Interval, how to solve that ?QV_QCM_Capture.JPG

Community Browser