Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

mov
Esteemed Contributor III

Re: how to get minutes from..

You know your data bettter than anyone here can guess.  I can only tell that 11:45 without AM/PM is 11:45 AM, and 12:32 without AM/PM is 12:32 PM.  Interval will be 24 hours and 47 minutes (1487 minutes).  If it is not corret, you have to specify AM/PM.

Highlighted
qvraj123
Contributor II

Re: how to get minutes from..

Mike, you are right, how could I miss some simple things

I really appreciate your time - Thanks

Raj

MVP
MVP

Re: how to get minutes from..

if you have PM AM in your data, use tt

if you don't have PM AM, don't use tt

I repost my 2 previous answers

1) with AM PM in the data, you need tt in the format 'YYYYMMDD hh:mm:ss tt'

=interval(

timestamp#('20150512 12:30:00 AM', 'YYYYMMDD hh:mm:ss tt') - timestamp#('20150511 11:45:00 PM', 'YYYYMMDD hh:mm:ss tt')

, 'mm')

2) without AM PM in the data, no tt in the format 'YYYYMMDD hh:mm:ss'

LOAD *,

interval(

timestamp#(ENDTIME, 'YYYYMMDD hh:mm:ss') - timestamp#(STARTTIME, 'YYYYMMDD hh:mm:ss')

, 'hh mm ss')           // or 'mm' for min

INLINE [

    JOBNAME, STARTTIME, ENDTIME

    XYZ, 20150511 11:45:05, 20150512 12:32:05

    ABC, 20150511 11:46:08, 20150512 12:33:08

    WBC, 20150511 11:47:10, 20150512 12:34:10

    AAA, 20150511 11:57:56, 20150512 12:45:09

];