date question for a form

G

Guest

on my form i am try to build a part that adds two other parts together but it
is adding the wrong parts. i have a life expectancy of product section, and
i want this to add to a section i have that has date item was put in to use
and the resulting field is needed replace date. the problem is that the life
expectancy is adding the days not the years. this is what i have for the
expression builder but it is adding the days like 5/5/2005 + 7 = 5/12/2005
when i want 5/5/20012 as an answer
=[Date Item was put in to use]+[Life Expectency of Unit (in Years)]
 
G

Guest

The + will add as days, use DateAdd function instead

=DateAdd("yyyy",[Life Expectency of Unit (in Years)],[Date Item was put in
to use])

"yyyy" - specify that you want to add it as years
 
A

Allen Browne

Use DateAdd(), e.g.:

DateAdd("yyyy", [Life Expectency of Unit (in Years)], [Date Item was put
in to use])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top