Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Supract two field values in Qlikview

Hi ...

  I have two fields like...

First field contains:

Start date time:05:01:13:113

End date Time:05:01:13:313

I want to find out end date time-start date time ..IN Qlikview how can i do this?

Please can any one help me?

12 Replies
Anonymous
Not applicable
Author

use

time#('05:01:03:313','hh:mm:ss:ms')-time#('05:01:13:113','hh:mm:ss:ms')

returns number ind ecimal

you might want to format it too

MK_QSL
MVP
MVP

=Interval(EndTime-StartTime,'hh:mm:ss')

tresesco
MVP
MVP

[End date time]-[Start date time] as NumDiff

Interval([End date time]-[Start date time] , '<Yourfomat>') as FormattedDiff

MayilVahanan


Hi

Try with

=Interval(EndDateTime-StartDateTime,'hh:mm:ss:fff')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ashfaq_haseeb
Champion III
Champion III

Hi,

Try below

timestamp(Timestamp#(Field2, 'hh:mm:ss')-Timestamp#(Field1, 'hh:mm:ss')) as NewField

or

=Interval(Time(Field2) - Time(Field1)) as NewField

or

[Field2]-[Field1] as NewField

Regards

ASHFAQ

Anonymous
Not applicable
Author

Hi ..when i am trying to do this...

Interval (time('TextBetween( CALL_DATA,'ENDDATETIME>','</'),'hh:mm:ss:ms')-time('TextBetween( CALL_DATA,'ENDDATETIME>','</'),'hh:mm:ss:ms'')) as ivr

it gives error...

tresesco
MVP
MVP

Try like:

Interval (time#(TextBetween( CALL_DATA,'ENDDATETIME>','</'),'hh:mm:ss:ms')-time#(TextBetween( CALL_DATA,'ENDDATETIME>','</'),'hh:mm:ss:ms')) as ivr

Note: removed two unnecessary single quotes and time#.

Anonymous
Not applicable
Author

Hi..

When i follow urs code script run successfully but it does not display any data in dash board...

Please find following attachments

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=Interval(Timestamp#('05:01:13:313', 'hh:mm:ss:fff') - Timestamp#('05:01:13:113', 'hh:mm:ss:fff'), 'hh:mm:ss:fff')

Regards,

jagan.