average time between two date ranges

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Need to find out the average number of days between the date and the ship
date. This needs to be shown line by line for a future report. I am new to
access so not that familiar with writing code to do this.

date SHIPDATE
01-Jul-06 11-Jul-06
01-Jul-06 03-Jul-06
03-Jul-06 06-Jul-06
03-Jul-06 13-Jul-06
03-Jul-06 13-Jul-06

TIA,
Marilyn
 
You can use SQL like:

SELECT Avg(DateDiff("d",[Date], [SHIPDATE]) As AvgDays
FROM tblNoNameGiven;

Or you can set a control source to something like:
=DAvg("DateDiff('d',[Date], [SHIPDATE])","tblNoNameGiven")
 
Thank you! it worked for me.

Duane Hookom said:
You can use SQL like:

SELECT Avg(DateDiff("d",[Date], [SHIPDATE]) As AvgDays
FROM tblNoNameGiven;

Or you can set a control source to something like:
=DAvg("DateDiff('d',[Date], [SHIPDATE])","tblNoNameGiven")


--
Duane Hookom
MS Access MVP


Marilyn said:
Need to find out the average number of days between the date and the ship
date. This needs to be shown line by line for a future report. I am new to
access so not that familiar with writing code to do this.

date SHIPDATE
01-Jul-06 11-Jul-06
01-Jul-06 03-Jul-06
03-Jul-06 06-Jul-06
03-Jul-06 13-Jul-06
03-Jul-06 13-Jul-06

TIA,
Marilyn
 
Back
Top