Date Specific calculation

G

Guest

I am looking for a solution to my problem in access in regards to a
calculation that shows the days from the beggining of a project to a specific
date. For example: a project could have a start date of 01/01/2001, I want to
figure out how many days has this project been worked on as of 03/22/2007. I
need this to show as of a past date, therefore now() doesn't work. In excel
the formula is Date(year,month,day), but when I put that in access it doesn't
work. Can somebody help me?

Hopefully you can.
 
J

Jeff Boyce

Nick

The Access function Date() returns the current date on your PC.

If you want to find the difference between one date and another, take a look
in Access HELP for the syntax on the DateDiff() function.

If you want to specify a date, you can have your query prompt for a date
parameter.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jeff Boyce

Nick

Check Access HELP on "parameter query".

Open the query in design view. Make sure the field that holds the date is
in the "grid".

In the "cell" under that date field, in the row for Selection Criteria, add
in a prompt/reminder between square brackets:
[Enter a date]
If you want to be very sure, use the menu to define this parameter (be sure
to spell it EXACTLY the same) as a Date/Time value.

If you want to have all dates before your [Enter a date] value, use:
<[Enter a date]
and so on...

Regards

Jeff Boyce
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

Top