counting number of days between today's date and start date

G

Guest

Hi,

I am trying to find away of calculating how many days there are between
today's date and the start date. This is basically what I have:

Start date of audit/SA: dd/mm/yyyy
Running day count:

and I also have various other fileds. I've created a field in my table
called Running Day Count. What I need to do is show many days have elasped
between todays date and the Start date of audit/SA.

I hope this make sense. Please help, this is quite urgent.

Thanks in advance
 
J

Jeff Boyce

Look at Access HELP on the DateDiff() function.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Steve

DateDiff("d",[StartDate],Date())

The Date() function returns today's date.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
G

Guest

Thanks for the reply.

I've looked at the DateDiff() function in help. Does this mean that I have
to create a field in my table with an automatic generation of today's date.
If so how do I make it that it automatically generate today's date. Once I've
done that, do I use this sample expression:

=DateDiff("d", [OrderDate], [ShippedDate])

If so where do I type this function into?

Please help as I am a very very novice at this.

Thanks again.
 
G

Guest

I am very new to this.

Can you please tell me where I should place the expression:

DateDiff("d",[StartDate],Date())


Thanks


Steve said:
DateDiff("d",[StartDate],Date())

The Date() function returns today's date.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)





ASSK said:
Hi,

I am trying to find away of calculating how many days there are between
today's date and the start date. This is basically what I have:

Start date of audit/SA: dd/mm/yyyy
Running day count:

and I also have various other fileds. I've created a field in my table
called Running Day Count. What I need to do is show many days have elasped
between todays date and the Start date of audit/SA.

I hope this make sense. Please help, this is quite urgent.

Thanks in advance
 
J

John W. Vinson

Hi,

I am trying to find away of calculating how many days there are between
today's date and the start date. This is basically what I have:

Start date of audit/SA: dd/mm/yyyy
Running day count:

and I also have various other fileds. I've created a field in my table
called Running Day Count. What I need to do is show many days have elasped
between todays date and the Start date of audit/SA.

The field Running Day Count *SHOULD NOT EXIST* in your table. It's derived
data, and can and should be recalculated whenever you need it.

Remove the field from your table design; instead, create a Query based on the
table. Select all of the fields that you want to see and put the DateDiff()
expression that Jeff and Steve suggested in a vacant Field cell:

Running Day Count: DateDiff("d", [Start date of Audit/SA], Date())

Note also that it's best NOT to use special characters such as / or even
blanks in fieldnames. I'd suggest using StartDate as the fieldname for the
table date field, and RunningCount for the calculated field in the query. You
can put whatever human-meaningful labels you like on a Form or Report, which
should be the only places where you interact with the data.

John W. Vinson [MVP]
 
S

Steve

John Vinson's response tells you where to place the expression.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)




ASSK said:
I am very new to this.

Can you please tell me where I should place the expression:

DateDiff("d",[StartDate],Date())


Thanks


Steve said:
DateDiff("d",[StartDate],Date())

The Date() function returns today's date.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)





ASSK said:
Hi,

I am trying to find away of calculating how many days there are between
today's date and the start date. This is basically what I have:

Start date of audit/SA: dd/mm/yyyy
Running day count:

and I also have various other fileds. I've created a field in my table
called Running Day Count. What I need to do is show many days have
elasped
between todays date and the Start date of audit/SA.

I hope this make sense. Please help, this is quite urgent.

Thanks in advance
 

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