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

How to add date to date in access?

yosiro
P: 34
In query design:

FIELD=
date out : 17 August 2010
free days : 2 years

Result in next field = 17 August 2012

What the formula for that?

I try to write like this

Expand|Select|Wrap|Line Numbers
  1. Result:[date out]*720
But it show wrong date format.
Sep 4 '12 #1

✓ answered by twinnyfo

Yosiro,

Try this:

Expand|Select|Wrap|Line Numbers
  1. Format([date out]+720,"dd Mmmm yyyy") 
  2.  

Share this Question
Share on Google+
3 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,282
Yosiro,

Try this:

Expand|Select|Wrap|Line Numbers
  1. Format([date out]+720,"dd Mmmm yyyy") 
  2.  
Sep 4 '12 #2

zmbd
Expert Mod 5K+
P: 5,397
Twinnyfo,
and might return a string

Yosiro,
Try the dateadd function instead
http://office.microsoft.com/en-us/ac...001228810.aspx

-z
Sep 4 '12 #3

Rabbit
Expert Mod 10K+
P: 12,365
1) Why would you multply if you're trying to add?
2) You're not adding a date to a date, you're adding a length of time to a date.
3) 720 days is not equal to 2 years, 730.5 is.
4) Even if you use 730 or 730.5, it doesn't fully account for leap years.

So do as zmbd says and use date add.
Sep 4 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.