calculating the difference between two different fields.

R

R Tanner

Hi,

I have a database for incidents and each incident has a start and end
date. How can I make the duration field calculate the difference
between these other two?

Thanks!
 
P

pietlinden

Hi,

I have a database for incidents and each incident has a start and end
date.  How can I make the duration field calculate the difference
between these other two?

Thanks!

DATEDIFF not working for you?
 
R

R Tanner

This is what I am entering and it is telling me I have the wrong
number of arguments...

DateDiff ([Date Resolved]-[Date Created])

I'm sorry, I'm just learning Access. I'm very good with Excel and
fairly decent with VBA in Excel, but not so hot with Access quite
yet.
 
L

Larry Linson

R Tanner said:
This is what I am entering and it is telling me I have the wrong
number of arguments...

DateDiff ([Date Resolved]-[Date Created])

I'm sorry, I'm just learning Access. I'm very good with Excel and
fairly decent with VBA in Excel, but not so hot with Access quite
yet.

From Access 2003 Help, the format of the DateDiff function is:

DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])

Note that each of the dates is an argument to the function, and arguments
are separated by a comma, not a minus sign. You can get to help by opening
any module window, typing in DateDiff (even on a comment line), and pressing
F1. It's always a good idea to check the Help on a built-in function when it
doesn't seem to be working correctly for you.

Larry Linson
Microsoft Office Access MVP

Larry Linson
Microsoft Office Access MVP
 

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

Similar Threads


Top