Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
1adam_haj
Contributor III
Contributor III

Interval over the line

How to deal with wrong format of data ?

I have a table like this

Time 1Time 2Interval
2.1.2017 20:002.1.2017 21:00Interval between Time2-and UpperTime1
1.1.2017 20:001.1.2017 21:00Interval between Time2-and UpperTime1

How can i calculate Interval between Time 2 ( Lower line )  and Time 1 ( Upper line  )

I tried this, but red line didnt give any result ... the formated times are displayed good.

data:

Load

*,

[Formated Time 2] - peek([Formated Time 1]) as Difference;

Load

RecNo() as Index,

date#([Time 1],'M.D.YYYY hh:mm') as [Formated Time 1],

date#([Time 2],'M.D.YYYY hh:mm') as [Formated Time 2]

1 Reply
MarcoARaymundo
Creator III
Creator III

data:

LOAD

     *,

     [Formated Time 2] - Previous([Formated Time 1]) as Difference;

     LOAD

          RecNo() as Index,

          date#([Time 1],'M.D.YYYY hh:mm') as [Formated Time 1],

          date#([Time 2],'M.D.YYYY hh:mm') as [Formated Time 2]

     FROM SourceFile;