Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Adding text in between Time

Hi all,

I have two dates, namely start_date and end_date

and i have  found a duration between them as

     start_date                                       end_date                              Duration

31-aug-2016   08:16:11 Am             31-aug-2016   08:17:11 Am          00:01:00

Here in that duration i want to display it has 00 hrs : 01 min : 00 sec

i want to add text as hrs : min : sec in that duration. pls help me know how to do that.

Thanks

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Adding text in between Time

subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 1) & ' hrs : ' &

subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 2) & ' min : ' &

subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 3) & ' sec'


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Adding text in between Time

subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 1) & ' hrs : ' &

subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 2) & ' min : ' &

subfield( interval( end_date - start_date, 'hh:mm:ss'), ':', 3) & ' sec'


talk is cheap, supply exceeds demand

View solution in original post

Highlighted
Specialist III
Specialist III

Re: Adding text in between Time

You can make something like this:

date(floor(start_date), 'DD-MMM-YYYY') & '  ' & hour(time(start_date)) & 'hrs : ' & minutes(time(start_date)) & 'min : ' & seconds(time(start_date)) & ' sec' as start_date,

date(floor(end_date), 'DD-MMM-YYYY') & '  ' & hour(time(end_date)) & 'hrs : ' & minutes(time(end_date)) & 'min : ' & seconds(time(end_date)) & ' sec' as end_date

Best regards,

Data Architect MB

Highlighted
Creator III
Creator III

Re: Adding text in between Time

Thanks all for your solutions