Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add text to Duration Label

I would like to add a more descriptive label to the following table

http://imgur.com/a/rM0aF

At the moment the label has the format : 690.15:38 which is the shorthand for Days.Hours:Mins which can be a bit difficult to read. preferably I would like it to read: 690 Days, 15 Hours, 38 Mins or even 690d, 15h, 38m. I have tried looking into this but I cannot determine if this is possible or not.

The field itself is a measure and it is number formatted with the Duration format pattern: "h:mm:ss"

7 Replies
sunny_talwar

See if Marcus's response here helps:

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

Anonymous
Not applicable
Author

Hi Sunny

The issue I have is that I have formatted the "SettingTime" like so:

time(Frac(Timestamp([SettingTime], 'YYYY-MM-DD HH:MM:SS')),'hh:mm') AS [Clean Setting Time]

in order to allow me to add up the time duration correctly. using the link you provided above does not work.

sunny_talwar

Would you be able to share a sample to test it out?

Anonymous
Not applicable
Author

Yes please see attached content on the first post. Thank you.

sunny_talwar

What you have right now is time... do you want to see time or duration....

690 Days, 15 Hours, 38 Mins -> This would be duration as it tells me that there has been 690 days 15 hours and 38 minutes between events


10:20 -> current time...


What exactly are you looking to do? Can you clarify

Anonymous
Not applicable
Author

Hi Sunny

I am looking to plot the duration. The rolling time is stored as a timestamp i.e 01/01/1900 00:45 and what I want from this is the amount of time passed, so 45 mins in this case.

sunny_talwar

Yes, I see what you mean. Apologize for not seeing that earlier. It seems that formatting is still kind of restrictive in Qlik Sense. Not sure if I know how this can be done.

May be someone else might be able to help.

Best,

Sunny