Date Calculation

  • Thread starter Thread starter John Hansen
  • Start date Start date
J

John Hansen

I have two Date/Time fields on a spreadsheet, AppReceived and AppProcessed.
I need Access to calculate the number of days from when an application was
received and when it was processed. I've tried DateDiff, but keep getting
errors. Can someone offer a suggestion? Thanks!
 
DateDiff("d", [AppReceived], [AppProcessed]) should give you the number of
days between the two dates, provided both have values.
 
Hi

spreadsheet ? are you talking about excell or access

if you're using access form try something like this in a text box - you're
using a query change "=" to "Days:" (without the commas)

=DateDiff("d", [AppReceived], [AppProcessed])

If this doesn't work then you could post more details about the specific
error message and controls (names and formats, etc)
 
There have been several. One says "The expression you entered has a function
containing the wrong number of arguments". Another way I tried it tells me
"The database engine does not recognize either the field "AppProcessed" in a
validation expression, or the default value in the table...". I haven't been
able to recreate all the others.
 
Thank you for your suggestions. Access still gives the error "The database
engine does not recognize either the field "AppProcessed" in a validation
expression, or the default value in the table...".

Douglas J. Steele said:
DateDiff("d", [AppReceived], [AppProcessed]) should give you the number of
days between the two dates, provided both have values.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


John Hansen said:
I have two Date/Time fields on a spreadsheet, AppReceived and AppProcessed.
I need Access to calculate the number of days from when an application was
received and when it was processed. I've tried DateDiff, but keep getting
errors. Can someone offer a suggestion? Thanks!
 
Thank you for your suggestions. Access still gives the error "The database
engine does not recognize either the field "AppProcessed" in a validation
expression, or the default value in the table...".

Douglas J. Steele said:
DateDiff("d", [AppReceived], [AppProcessed]) should give you the number of
days between the two dates, provided both have values.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


John Hansen said:
I have two Date/Time fields on a spreadsheet, AppReceived and AppProcessed.
I need Access to calculate the number of days from when an application was
received and when it was processed. I've tried DateDiff, but keep getting
errors. Can someone offer a suggestion? Thanks!

Where are you putting the expression? It should be in a vacant Field cell in
the query design grid, or else preceded by an = sign in the Control Source
property of a Form or Report textbox.

John W. Vinson [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

Back
Top