Can I calculate the time delta between two separate events?

I need a little help.   In Report Services Report Writer, I am trying to calculate the difference between two date/times as they relate to an error that has occurred on a production line.  The available date fields show as follows:

 

Error Date

First Error Date

Last Error Date

First Repair Date

Last Repair Date

1

4/17/2006 08:23:29 AM

4/17/2006 08:23:29 AM

4/17/2006 08:23:29 AM

4/17/2006 08:23:37 AM

4/17/2006 08:23:37 AM

2

4/17/2006 08:34:56 AM

4/17/2006 08:34:56 AM

4/17/2006 08:34:56 AM

4/17/2006 08:35:43 AM

4/17/2006 08:35:43 AM

If 1-Error Date is my start point how can I calculate the delta to 2-Error date

If I use DATEDIFF("Second", ErrorDate, ErrorDate), the function errors for obvious reasons.

If I use DATEDIFF("Second", LastRepairDate, ErrorDate), I get the amount of time consumed by the error.

If I use DATEDIFF("Second", ErrorDate, LastErrorDate), I get a negative.

I have tried variations of all fields but end up with one of the three described results.

In summary, how can I calculate the delta between two distinct events   Thanks for your assistance on this one.

 



Answer this question

Can I calculate the time delta between two separate events?

  • Can I calculate the time delta between two separate events?