Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Producing an average

Status
Not open for further replies.

mattpv

IS-IT--Management
Nov 6, 2001
41
US
I have a shipping dB, that has a shipped out date and a date returned. I know this is pretty simple but could someone help me with the code that would allow me to subtract the date shipped from the date returned to produce an average ship time. The data fields are in date format, medium version. I appreciate all the help
 
In a query create a new field. Try the following:
Spread (or any name you choose):[Date_Rec]-[Date_Shipped]

This should do the trick.
 
[Date_Rec]-[Date_Shipped] will do the subtraction - hoever it will generally return a floating point number. If you follow the MS trail, the recommended soloution would be more like:

Days2Dhip: DateDiff("d", [Date_Rec], [Date_Shipped])



MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top