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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Text in between Time Format.

Hi all,

i have two times, as a field namely

START_TIME

10:40:00

END_TIME

11:45:00

DURATION_TIME

01:05:00

and i found the duration between those two..

Now i want to display this duration time as 01 hour : 05 minutes : 00 seconds

Can we add text in between time format or is there any other way to achieve this..

Thanks..

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Kishore,

Time(DURATION_TIME,'hh') & ' hour : ' & Time(DURATION_TIME,'mm') & ' minutes : ' & Time(DURATION_TIME,'ss')  & ' seconds'

if your DURATION_TIME field is in text format, you have to try like below.

Time(Time#(DURATION_TIME,'hh:mm:ss'),'hh') & ' hour : ' & Time(Time#(DURATION_TIME,'hh:mm:ss'),'mm') & ' minutes : ' & Time(Time#(DURATION_TIME,'hh:mm:ss'),'ss')  & ' seconds'

View solution in original post

2 Replies
tamilarasu
Champion
Champion

Hi Kishore,

Time(DURATION_TIME,'hh') & ' hour : ' & Time(DURATION_TIME,'mm') & ' minutes : ' & Time(DURATION_TIME,'ss')  & ' seconds'

if your DURATION_TIME field is in text format, you have to try like below.

Time(Time#(DURATION_TIME,'hh:mm:ss'),'hh') & ' hour : ' & Time(Time#(DURATION_TIME,'hh:mm:ss'),'mm') & ' minutes : ' & Time(Time#(DURATION_TIME,'hh:mm:ss'),'ss')  & ' seconds'

PrashantSangle

or you can try

subfield(Duration_Time,':',1)&' Hours : '&subfield(Duration_Time,':',2)&' minutes : '&subfield(Duration_Time,':',3)&' Seconds'

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂