Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

pauluk__
Not applicable

Adding custom strings to formats (interval, date, time)

Hi,

I'm using the interval function to work out the period between two datetime values, in days and hours, as below:

Interval(ReloadTime() - L_DispatchRequestTime, 'd - hh')

Whilst this gives the correct results it looks very confusing. I'm looking to add my own custom labelling to the format so I can something like:

'1 day 5 hours'

Is there any way of adjusting the formatting so I can fully customise the labelling, or get the result above?

Thanks in advance.

2 Replies
marcus_sommer
Not applicable

Re: Adding custom strings to formats (interval, date, time)

Try something like this: =replace(replace(interval(1.55, 'd X - h Z'), 'X', 'day(s)'), 'Z', 'hours')

- Marcus

pauluk__
Not applicable

Re: Adding custom strings to formats (interval, date, time)

This works great, thanks.