average time between two date ranges

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
 
D

Duane Hookom

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")
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top