Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to calculate the time difference between two different date?

Hi All,

Good Morning....!

I have issue with date.

I want to calculate time difference.

For Ex:

We have two date like this

End date = 2012/10/02  11:55:25 PM.

Start Date= 2012/10/03  01:55:26 AM.

want_date= End date -Startdate

I want a 'want_date' as Minitues.

Thanks in Advance,,,.

Regards,

Kabilan K

1 Solution

Accepted Solutions
jsn
Honored Contributor

Re: How to calculate the time difference between two different date?

=Interval(Enddate-Startdate, 'mm')

This is assuming that your timestamps are recognized correctly in QV.

Works fine if you define them like this:

let Startdate = num(timestamp#('2012/10/02  11:55:25 PM','YYYY/MM/DD  hh:mm:ss TT'));

let Enddate= num(timestamp#('2012/10/03  01:55:26 AM','YYYY/MM/DD  hh:mm:ss TT'));

1 Reply
jsn
Honored Contributor

Re: How to calculate the time difference between two different date?

=Interval(Enddate-Startdate, 'mm')

This is assuming that your timestamps are recognized correctly in QV.

Works fine if you define them like this:

let Startdate = num(timestamp#('2012/10/02  11:55:25 PM','YYYY/MM/DD  hh:mm:ss TT'));

let Enddate= num(timestamp#('2012/10/03  01:55:26 AM','YYYY/MM/DD  hh:mm:ss TT'));

Community Browser