I am trying to calculate the difference between two date/times as they relate to two separate errors that have occurred on a production line. The available date fields are as follows:
|
|
Error Date |
First Error Date |
Last Error Date |
First Repair Date |
Last Repair Date |
|
1 |
|||||
|
2 |
I need to calculate the delta from 4/172006 08:23:29 AM and 4/17/2006 08:34:56 AM. Any combination of dates yields the delta within the line item, not between two different line items.
The goal is to be able to calculate the mean time between failure or frequency of a failure.
In summary, how can I calculate the delta between two distinct events I really need help with this. Thank you.

How do I calculate the difference between two line items?
PLechner
bensterdev
Can you provide more info on what didn't work I'm using SQL 2005 RS and it works for me:
I created a report with data set:
select 1 as a, 1 as b
union
select 2 as a, 2 as b
union
select 3 as a, 3 as b
Then I added a table with the following expressions in two columns:
And I got this output:
I'm just adding the values, but it should be just the same for you just subtract, create a column for "delta" then use the Avg (average) function in a grouping to determine the average...
Hope that helps,
-Lukasz
Praj1
See if this helps:
Previous function: http://msdn2.microsoft.com/en-us/library/ms156372.aspx
DateDiff: http://msdn2.microsoft.com/en-us/library/b5xbyt6f.aspx
For example,
=DateDiff(DateInterval.Seconds,Previous(Fields!MyDate.Value),Fields!MyDate.Value))
---------------------------------------------------------------------------
Download the latest Books Online update:
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
This posting is provided "AS IS" with no warranties, and confers no rights.