A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date function



 
 
Thread Tools Display Modes
  #1  
Old September 18th, 2009, 03:54 PM posted to microsoft.public.access.forms
Chris
external usenet poster
 
Posts: 34
Default Date function

Hello all. This should be a pretty easy question. The following date
function I'm using gives me the date one year from the current date.
However, it only gives me the fist day of that date one year from now. So
today is 09/18/2009 and my date function gives me 09/01/2010. What I would
like it to do is give me the exact month/day/year one year into the future.
So if my date was 09/18/2009 I would like to return the date of 09/18/2010.
Below is the function I'm currently using. Thanks so much for your help.

DateSerial(Year(Date), Month(Date) + 12, 1)

Chris


  #2  
Old September 18th, 2009, 04:46 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Date function

DateAdd("yyyy", 1, Date)

or

DateAdd("m", 12, Date)

or

DateSerial(Year(Date), Month(Date) + 12, Day(Date))

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


"Chris" wrote in message
...
Hello all. This should be a pretty easy question. The following date
function I'm using gives me the date one year from the current date.
However, it only gives me the fist day of that date one year from now. So
today is 09/18/2009 and my date function gives me 09/01/2010. What I
would like it to do is give me the exact month/day/year one year into the
future. So if my date was 09/18/2009 I would like to return the date of
09/18/2010. Below is the function I'm currently using. Thanks so much for
your help.

DateSerial(Year(Date), Month(Date) + 12, 1)

Chris



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.