Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
suzel404
Creator
Creator

How can I compare date (lines)


Hi all,

I want to identify the delay between each line of the START_DATE. I use Peek function but I don't know how can obtain the good result.

LOAD* INLINE [
ID_STORE, END_DATE, BRAND_CODE, STORE, START_DATE, CLOSING_DATE
6888, 04/01/2014 13:01:12, H221, 545, 26/12/2013 00:00:00, 26/12/2013 00:00:00
6888, 04/01/2014 13:01:12, H222, 545, 26/12/2013 14:24:00, 27/12/2013 06:21:00
6888, 04/01/2014 13:01:12, H223, 545, 27/12/2013 12:53:00, 27/12/2013 12:54:12
6888, 04/01/2014 13:01:12, H224, 545, 04/01/2014 00:00:00, -
6888, 04/01/2014 13:01:12, H225, 545, 24/01/2014 15:19:56, 24/01/2014 15:19:56]
;

Delay = Delay in lines (START_DATE) : lines 2 - lines 1

Line 1 : 26/12/2013 00:00:00 -

Line 2 : 26/12/2013 14:24:00-

Line 3 : 27/12/2013 12:53:00-

Line 4 : 04/01/2014 00:00:00-

Line 5 : 24/01/2014 15:19:56-

Thanks for your help.

1 Solution

Accepted Solutions
Not applicable

Hi,

Find the atatchment

View solution in original post

7 Replies
sujeetsingh
Master III
Master III

rohit214
Creator III
Creator III

hi,

You can use peek, previous ,above function.

peek and previous function youo can use in backend but above function in frontend in any table.

ex

peek([field name],0)

thanks

rohit

Not applicable

Hi,

Find the atatchment

sujeetsingh
Master III
Master III

See this sample

amit_saini
Master III
Master III

Hi ,

Please try this:

=Interval(Date1-Date2,'d hhmm:ss') ----->>> For calculating difference

=Year(Date1) - Year(rDate2)--->>>>For Year Difference Calculation.

Thanks,

AS

arjunkrishnan
Partner - Creator II
Partner - Creator II

Hai Joshu

Use This Expressin In Back EnD...It Will Working Fine to Compare The Date on Same Column...

=Interval(Date(START_DATE,'DD/MM/YYYY hh:mm:ss')-Date(Peek(START_DATE),'DD/MM/YYYY hh:mm:ss'),'DD hh:mm:ss') AS INRERVAL

suzel404
Creator
Creator
Author

Hi all,

Sorry for my delay. Really!!

Thanks you at all,  the solution proposed works well.

Thanks you.