# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for
Did you mean:
Specialist II

## Exp Help

HI All,

I have two Time Value

Time1                               Time 2                              Difference = Time1 - Time2

10:43:36 AM                    10:22:00 AM                         Ouput Required in Seconds

I am simply Doing Time1-Time2 and Getting output 175.98499988425;

expected output is 21:36 Minutes... Final result want in seconds

Abhay

1 Solution

Accepted Solutions
Partner

Time in minutes:

(Frac(Time1) - Frac(Time2)) * 1440

Time in seconds:

(Frac(Time1) - Frac(Time2)) * 1440 * 60

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
12 Replies
MVP

Try this:

Interval(Time#('10:43:36 AM', 'hh:mm:ss TT') - Time#('10:22:00 AM', 'hh:mm:ss TT'), 'mm:ss')

Master III

=Interval(Time#('10:43:36 AM', 'hh:mm:ss TT') - Time#('10:22:00 AM', 'hh:mm:ss TT'), 's')

Specialist

=Interval(Time#('10:43:36 AM','hh:mm:ss tt')-Time#('10:22:00 AM','hh:mm:ss tt'),'mm:ss')

or

=Interval(Time#('10:43:36 AM','hh:mm:ss tt')-Time#('10:22:00 AM','hh:mm:ss tt'),'ss')&' Seconds'

Specialist II
Author

HI,

Not Working

Interval(Time#(Time1Field, 'hh:mm:ss TT') - Time#(Time2Field, 'hh:mm:ss TT'), 's')

regards

Abhay

Specialist

Hi try this,

Interval(Time#(Time1)-Time#(Time2),'hh:mm:ss') as TimeDiff

MVP

See if this is what you want:

Expression: =Interval(Time#('10:43:36 AM', 'hh:mm:ss TT') - Time#('10:22:00 AM', 'hh:mm:ss TT'), 'mm:ss')

Not sure though but It seems your time fields are of Timestamp type else suggested solution would have worked. May be Try Frac() before Time# function.

Not applicable

Hi Abhay,

Go to Number tab,

Choose the format of Time1, Time2, and Difference (TIme1-Time-2) as Time in Number tab.

Regards,

Pavan.

Specialist II
Author

I m trying below

Interval((Time(DateRecorded_Test, 'hh:mm:ss TT')) - (Time(UTC_World_TIme, 'hh:mm:ss TT')), 'mm:ss')

Regards

Abhay

Community Browser