Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 13th, 2005, 07:40 PM
Authorized User
 
Join Date: Aug 2004
Location: LAKESIDE, California, USA.
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update Date Field

I have a database that that has a renewal date that has to be updated every time a renewal is entered renewals are every two years at the end of the month, how do I make the date automatically add a year on its own. Currently I'm using repeating values like Renewal one Renewal two with this formula

=DateSerial(Year([LicenseExpireDate])+6,Month([LicenseExpireDate]),Day([LicenseExpireDate]))

  #2 (permalink)  
Old October 16th, 2005, 12:25 AM
Friend of Wrox
 
Join Date: Jul 2005
Location: Oklahoma City, OK, USA.
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would use the DateAdd() function. You can use this to add 1 or 2 years to a date.



Boyd
"Hi Tech Coach"
Access Based Accounting/Business Solutions developer.
http://www.officeprogramming.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an auto update date field tmswenson MySQL 3 January 4th, 2006 03:12 PM
Trying to update a date field jfrizelle Classic ASP Databases 3 November 4th, 2004 08:55 AM
Update city field based on zip field nganb SQL Server ASP 0 April 22nd, 2004 10:30 PM
Update a date field levinll SQL Language 1 January 16th, 2004 02:41 PM
SQL2000 Date/Time field update Lucian Ion Dreamweaver (all versions) 9 January 2nd, 2004 09:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.