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: 
Not applicable

how to format timestamp out put into hours min and sec

How do i format the out come of substracting two timestamps into minutes or seconds. for instance this statement out come is 1 min 04 sec. I want to displace the average time taken in minutes and seconds

=Interval(Num(Date#('04-08-2012 05:11:11', 'DD-MM-YYYY hh:mm:ss')) - Num(Date#('04-08-2012 05:12:15', 'DD-MM-YYYY hh:mm:ss')))

The out put is like - 0:01:04.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding a mm:ss format string to the interval function:

=Interval(Date#('04-08-2012 05:11:11', 'DD-MM-YYYY hh:mm:ss') - Date#('04-08-2012 05:12:15', 'DD-MM-YYYY hh:mm:ss'), 'mm:ss' )


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
sushil353
Master II
Master II

Hi,

Try this:

 

=

date(avg(Interval(Num(Date#('04-08-2012 05:12:15', 'DD-MM-YYYY hh:mm:ss')) - Num(Date#

('04-08-2012 05:11:11', 'DD-MM-YYYY hh:mm:ss')))),'mm:ss')

HTH

Sushil

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding a mm:ss format string to the interval function:

=Interval(Date#('04-08-2012 05:11:11', 'DD-MM-YYYY hh:mm:ss') - Date#('04-08-2012 05:12:15', 'DD-MM-YYYY hh:mm:ss'), 'mm:ss' )


talk is cheap, supply exceeds demand
Not applicable
Author

try this

=Interval(Date#('04-08-2012 05:11:11', 'DD-MM-YYYY hh:mm:ss') - Date#('04-08-2012 05:12:15', 'DD-MM-YYYY hh:mm:ss'),'hh:mm:ss')