Full Version: Date Add function
UtterAccess Discussion Forums > Microsoft® Access > Access Date + Time
Nitrex
This si very simple to use and i went through the help files as well as the UA forum...

and produced the following

Q_Date = DateAdd(m, -2, dater)

which should give me a a date 2 months earlier.

instead i get an error message. saying

"invalid procedure call or argument"

Q_date is declared as a date as is the Dater (DD/MM/YY) variable.

any ideas, any one, any where...

many thanks

'Sometime you can't see the wood for the trees' anon
Chaga
try that:
Q_Date = DateAdd("m", -2, dater)
HTH
raskew
The interval (m) must be input as a string ("m"), i.e.

dater = date()
Q_Date = DateAdd("m", -2, dater)
? q_date
6/25/04

HTH - Bob
Nitrex
Yup it works now....

Thank you peeps...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.