By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,480 Members | 763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,480 IT Pros & Developers. It's quick & easy.

DateDiff, DateSerial, DateAdd, HELP

P: n/a
Thank you in advance. I'm trying to pull all inventory items from December
of the previous year back to 4 years for my accountant. I know this can be
done, but I'm drawing a blank. I've tried;

DateDiff("y",-4,DateIn) and get errors

Please any assistance would be greatly appreciated.

Michael
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The DateDiff example you are using is wrong. You need to supply two date
values for this one. I think this should be using DateAdd. Also, remember to
make sure that only valid dates are passed.

Mike Storr
www.veraccess.com
"PMBragg" <pm*****@megavision.com> wrote in message
news:gf****************@news.uswest.net...
Thank you in advance. I'm trying to pull all inventory items from December
of the previous year back to 4 years for my accountant. I know this can be
done, but I'm drawing a blank. I've tried;

DateDiff("y",-4,DateIn) and get errors

Please any assistance would be greatly appreciated.

Michael

Nov 12 '05 #2

P: n/a
In addition to Mike's comments, "y" means "day of year" in both DateDiff and
DateAdd. You need to use "yyyy" for year.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Mike Storr" <no****@somewhere.con> wrote in message
news:iN*********************@news20.bellglobal.com ...
The DateDiff example you are using is wrong. You need to supply two date
values for this one. I think this should be using DateAdd. Also, remember to make sure that only valid dates are passed.

Mike Storr
www.veraccess.com
"PMBragg" <pm*****@megavision.com> wrote in message
news:gf****************@news.uswest.net...
Thank you in advance. I'm trying to pull all inventory items from December of the previous year back to 4 years for my accountant. I know this can be done, but I'm drawing a blank. I've tried;

DateDiff("y",-4,DateIn) and get errors

Please any assistance would be greatly appreciated.

Michael


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.