access 2002 I need to cal the end date for a 36 or 48 month lease?

  • Thread starter date calc in query in access 2002
  • Start date
D

date calc in query in access 2002

I have a starrting date and need to add either 36 or 48 months the year. So
if I had 03/01/2005 in my start date field I neeto place 03/01/2009 in the
end date field for 48 months!
or 03/01/2008 for 36 months in the end date field.
I need to do this in a query!
 
L

Len

The best way to do it is by using days instead of years if you are restricted
to using a query.

In your update cell [TableName]![StartDate] + 1461 for four years.

You can also use an IIF in the decision box, but that can be very tricky
unless you are familar with it.


Len
 
G

George Nicholson

DateAdd("m", 36, Now())
returns
5/9/2008 5:14:31 PM (i.e., 36 months from today)

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"date calc in query in access 2002" <date calc in query in access
[email protected]> wrote in message
news:[email protected]...
 
D

Douglas J. Steele

Pardon me, but I certainly don't agree that's the "best way".

Use the DateAdd function with exactly what's wanted:

DateAdd("m", 36, [TableName]![StartDate]) or DateAdd("m", 48,
[TableName]![StartDate])



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Len said:
The best way to do it is by using days instead of years if you are
restricted
to using a query.

In your update cell [TableName]![StartDate] + 1461 for four years.

You can also use an IIF in the decision box, but that can be very tricky
unless you are familar with it.


Len

date calc in query in access 2002 said:
I have a starrting date and need to add either 36 or 48 months the year.
So
if I had 03/01/2005 in my start date field I neeto place 03/01/2009 in
the
end date field for 48 months!
or 03/01/2008 for 36 months in the end date field.
I need to do this in a query!
 
Top