Home  |   French  |   About  |   Search  | mvps.org  

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

In Memoriam

Terms of Use


VB Petition

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-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer