Dates and MTBF

  • Thread starter Thread starter Ana
  • Start date Start date
A

Ana

Hi,

I have the following columns:



Vehicle# DateRepair



12345 02/01/2004

12345 03/04/2004

12345 15/05/2004

12345 02/06/2004

11111 05/02/2004

11111 07/03/2004

11111 15/03/2004



I need to calculate the MTBF (Mean Time Between Failures) for each vehicle.
I cannot get DATEDIFF to work when I have more then 2 dates per vehicle.
Obviously, I'm missing something. Any help will be appreciated.

Ana
 
Hi,

I have the following columns:

Vehicle# DateRepair

12345 02/01/2004

12345 03/04/2004

12345 15/05/2004

12345 02/06/2004

11111 05/02/2004

11111 07/03/2004

11111 15/03/2004

I need to calculate the MTBF (Mean Time Between Failures) for each vehicle.
I cannot get DATEDIFF to work when I have more then 2 dates per vehicle.
Obviously, I'm missing something. Any help will be appreciated.

Ana

Here is a query SQL that will give that data.

SELECT tblServiceDone.Vehicle#, tblServiceDone.DateRepair,
[DateRepair]-DMax("[DateRepair]","tblServiceDone","[DateRepair]< #" &
[DateRepair] & "# and [Vehicle#] = '" & [Vehicle#] & "'") AS
[Interval]
FROM tblServiceDone
GROUP BY tblServiceDone.Vehicle#, tblServiceDone.DateRepair;

Change the table name as needed.
[Vehicle#] is a text datatype field.
 
Back
Top