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

Time interval to minutes as numeric value?

Hello,

I'm relatively new to QlikView, so perhaps this can be accomplished quite simple.

In script:

1. SET TimestampFormat='YYYY-MM-DD hh:mm:ss';

2. I have the following simplified situation from a LOAD on a .CSV table:

LOAD

//...

Timestamp#(@2) AS Time1,  // 26-Jul-12 15:59:45

Timestamp#(@10) AS Time2,  // 26-Jul-12 15:56:36

Interval(Timestamp#(@2)-Timestamp#(@10), 'm') AS TimeDiff_Minutes,

...

FROM SomeTable.csv

This runs fine and when defining a f.e. table I get a correct visual representation (here 3) for TimeDiff_Minutes..

However, when trying to re-use TimeDiff_Minutes in some sort of script calculation, it reverts to the INTERNAL representation for this interval. 

How can I get to the 'formatted' result in a script in order to re-use it, without having to duplicate the algorithm so nicely present in Interval already?

Best,

  -Emile

1 Reply
Not applicable
Author

To answer my own inquiry - Just saw the exact solution already answered here.  http://community.qlik.com/message/67986#67986

-Emile