View Single Post
  #3  
Old June 4th, 2010, 08:46 PM posted to microsoft.public.access
Daniel Pineault
external usenet poster
 
Posts: 658
Default Calculating number of days from input.

You can calculate the expiration date using the DateAdd Function

DateAdd(Interval As String, Number As Double, Date)

In your case, since you are talking about 90, 180 & 360 days you could use
the "d" interval, but you may also prefer to use the "m" interval (3, 6, 12)

DateAdd("m",3,date)
DateAdd("d",90,date)
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Dave" wrote:

How do you calculate the number of days from the original date the the record
was recorded.

for example

You have a text box the has three options 90 day, 180 days, and 360 days.

And a date and time box to true to show the expiration date.

How do I get the database to show the to calculate the expiration date
depending on the number of days that was selected.