Home  |  About  |   Search   

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

RunCommand Constants

Terms of Use


 

Date/Time: Return a date in the future from a given date

Author(s)
Dev Ashish

(Q) How do I take a date and return another date which is one year from the original date?

(A) This can be done with the DateSerial function. Check the DateSerial function out in Access Help. For example

    tmpDate = #1/1/97#
    newDate= DateSerial(year(tmpDate)+1, month(tmpDate), day(tmpDate))

    would return a value of #1/1/98# for newDate.

Alternate: **Posted by Terry Wickenden **

    You could also use the DateAdd function for this:
        NewDate = DateAdd( "yyyy", 1, tmpDate)


1998-2009, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer