Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Congratulations to the new Qlik Luminary and Partner Ambassador class! Meet them here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interval pattern

Hi,

I have a field containing a time interval between two dates.

I want to format this number with format : 4d, 3h

If I set "Interval" on Number tab with number pattern like "d d, h h" it replace every d or h char with the result, showing "4 4 3 3".

Is there any escape char on format string that I can use?

I've tried some like \d or 'd' unsuccessfully.

Thankyou!

Labels (1)
1 Reply
Miguel_Angel_Baeyens
Support
Support

Hello,

There's no way to get the format that way, so you will need to play with string functions to manually add the "d" or "h" characters to the result. As an example try this:

=SubField(Interval('25:00','D:h'), ':', 1) & 'd ' & SubField(Interval('25:00','D:h'), ':', 2) & 'h'


Hope that helps.