| | |
|
|
|
Dates in an expression |
| message from anonymous on 6 May 2004 |
Okay, I'm an idiot. Pretty new to Access. I need to
create an expression that will give me a value of the date
from one field + seven days. I have re-written this every
which way with no luck. Could anyone offer me a tip?
|
| Wayne Morgan replied to anonymous on 6 May 2004 |
=Date()+7
However, you said "field" not "control". This can't be done in a table. It
can be done using a calculated control, such as a textbox, on a form or
report. You shouldn't need to store calculated data since you can calculate
it whenever you need it.
The reason this equation works is because of the way Access/VBA handle
dates. Dates are a floating point number where the whole number portion is
the number of days since 30 DEC 1899 and the decimal portion is the time of
day (example: 1.25 would be 31 DEC 1899 6:00:00 AM). To add together other
units of time you would use the DateAdd function. This function can be used
to add days as well, its just not necessary.
|
|
Archived message: Dates in an expression (Microsoft Access Database)