Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Anonymous
Not applicable
Author

=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'));

View solution in original post

1 Reply
Anonymous
Not applicable
Author

=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'));