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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

duration ???/

Status
Not open for further replies.

kevinluebb

Programmer
Jan 4, 2002
30
0
0
US
I have a table with an INDATE, OUTDATE, NAME fields. I need to calculate the average duration by NAME. Is there a function in ACCESS that will calculate the number of days if given the INDATE, OUTDATE???? Once I have that number, I can come up with the average.
 
Try Datediff()
=DateDiff("d",[INDATE],[OUTDATE]) will give you the difference in days
 
I tried that (or so I think). Let me give it another shot. Maybe I've got "fat fingers" today....
 
I tried the DateDiff but keep getting a data type mismatch.

I need to display the number of days on a report. the data resides in a table.
InDate is in date/time format
ComDate is in date/time format

I created a query that will update a field in a new table. the field(daysdiff) is numeric (long) to hold the number of days. since this table has the InDate and ComDate from the original table already (in the date/time format), I'm updating the daysdiff field using the DateDiff......
set daysdiff = DateDiff("d",InDate,ComDate). When I attempt to run it, the data type mismatch happens.
Any ideas???????

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top