Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

date question for a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Need Access Help - 12 Jul 2007 15:16 GMT
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)]
Ofer Cohen - 12 Jul 2007 15:22 GMT
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

Signature

Good Luck
BS"D

> 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
[quoted text clipped - 4 lines]
> when i want 5/5/20012 as an answer
> =[Date Item was put in to use]+[Life Expectency of Unit (in Years)]
Allen Browne - 12 Jul 2007 15:26 GMT
Use DateAdd(), e.g.:

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

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> on my form i am try to build a part that adds two other parts together but
> it
[quoted text clipped - 8 lines]
> when i want 5/5/20012 as an answer
> =[Date Item was put in to use]+[Life Expectency of Unit (in Years)]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.