468,241 Members | 1,555 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,241 developers. It's quick & easy.

Date

Joe
In Excel you are able to write a formula
=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())) which will return
todays date 1 year ago. I'm not sure if I am explaining this right so
bear with me. Is there a similar function in Access that I can you in
a text box? Thanks.
Nov 12 '05 #1
5 4211
Did you mean something like Date()-365
"Joe" <jo**@cogeco.ca> wrote in message
news:p5********************************@4ax.com...
In Excel you are able to write a formula
=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())) which will return
todays date 1 year ago. I'm not sure if I am explaining this right so
bear with me. Is there a similar function in Access that I can you in
a text box? Thanks.

Nov 12 '05 #2
Joe
On Wed, 03 Sep 2003 01:24:49 GMT, "Omey Samaroo"
<no****@replytogroup.com> wrote:
Did you mean something like Date()-365
"Joe" <jo**@cogeco.ca> wrote in message
news:p5********************************@4ax.com.. .
In Excel you are able to write a formula
=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())) which will return
todays date 1 year ago. I'm not sure if I am explaining this right so
bear with me. Is there a similar function in Access that I can you in
a text box? Thanks.

Thanks, didn't realize it was so easy. The next question could be a
bit harder. How do I make it default to Jan 1 of the current year?

Nov 12 '05 #3
=DateAdd("yyyy",-1,Date())

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Joe" <jo**@cogeco.ca> wrote in message
news:p5********************************@4ax.com...
In Excel you are able to write a formula
=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())) which will return
todays date 1 year ago. I'm not sure if I am explaining this right so
bear with me. Is there a similar function in Access that I can you in
a text box? Thanks.

Nov 12 '05 #4
On Wed, 03 Sep 2003 02:24:06 GMT in comp.databases.ms-access, "Tim
Mills-Groninger" <ti***@earthlink.net> wrote:
dateserial(year(date())-1,month(date()),day(date()))

Microsoft is a bit like the former Soviet Union when it comes to consistancy
between applications. Excel's Today function maps to Access's Date(),
Excel's date becomes Access's DateSerial. And don't even get me started on
string functions. sigh.


How about string theory then? Access supports eleven dimentional
arrays <g>

--
A)bort, R)etry, I)nfluence with large hammer.

(replace sithlord with trevor for email)
Nov 12 '05 #5
On Wed, 03 Sep 2003 18:51:24 +0100 in comp.databases.ms-access, Trevor
Best <bouncer@localhost> wrote:
or use DateDiff()


or even DateAdd().. d'oh! :-)

--
A)bort, R)etry, I)nfluence with large hammer.

(replace sithlord with trevor for email)
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by androtech | last post: by
4 posts views Thread by Richard Hollenbeck | last post: by
2 posts views Thread by Tjerk | last post: by
9 posts views Thread by Thomas R. Hummel | last post: by
30 posts views Thread by Dr John Stockton | last post: by
1 post views Thread by Liz Malcolm | last post: by
12 posts views Thread by Assimalyst | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.