PC Review


Reply
Thread Tools Rate Thread

Adding Years to a Date

 
 
=?Utf-8?B?Sm9zZSBBbGVtYW4=?=
Guest
Posts: n/a
 
      28th Jun 2006
Hi,

I wanted to add two years to a date column.
Example:
07/01/06 = 07/01/08

Does anyone know how to do this?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWljaGFlbCBI?=
Guest
Posts: n/a
 
      28th Jun 2006
Hi.

Use the DateAdd function:

DateAdd("yyyy",2,[DateField])

-Michael



"Jose Aleman" wrote:

> Hi,
>
> I wanted to add two years to a date column.
> Example:
> 07/01/06 = 07/01/08
>
> Does anyone know how to do this?

 
Reply With Quote
 
Paul Overway
Guest
Posts: n/a
 
      28th Jun 2006
NewDate = DateSerial(Year(OldDate)+2,Month(OldDate),Day(OldDate))

--
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com


"Jose Aleman" <(E-Mail Removed)> wrote in message
news:0D11341E-5072-48C1-BD95-(E-Mail Removed)...
> Hi,
>
> I wanted to add two years to a date column.
> Example:
> 07/01/06 = 07/01/08
>
> Does anyone know how to do this?



 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      28th Jun 2006
Jose Aleman wrote:
> Hi,
>
> I wanted to add two years to a date column.
> Example:
> 07/01/06 = 07/01/08
>
> Does anyone know how to do this?


There is a DateAdd() function.

DateAdd("yyyy", 2, [YourDateField])

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
=?Utf-8?B?Sm9zZSBBbGVtYW4=?=
Guest
Posts: n/a
 
      28th Jun 2006
Thanks Mike.

I just had finished reading the previous post when you responded.

Thank You very much

"Michael H" wrote:

> Hi.
>
> Use the DateAdd function:
>
> DateAdd("yyyy",2,[DateField])
>
> -Michael
>
>
>
> "Jose Aleman" wrote:
>
> > Hi,
> >
> > I wanted to add two years to a date column.
> > Example:
> > 07/01/06 = 07/01/08
> >
> > Does anyone know how to do this?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding 10 years to a date Jason K Microsoft Excel Misc 2 24th Jun 2009 07:37 PM
Adding 40 years to date Jaydeebug Microsoft Excel Misc 3 9th Aug 2008 05:00 AM
Adding years to a Date =?Utf-8?B?U2VhbiBCaXNob3A=?= Microsoft Access Queries 3 30th Jul 2008 07:40 PM
adding years to date range tonyrulesyall@yahoo.com Microsoft Access Queries 1 8th Jun 2008 04:44 AM
Adding years to a date =?Utf-8?B?c3VtaXRr?= Microsoft Excel Misc 4 18th May 2006 09:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:03 AM.