Return a Date X Number of Days Before or After a Given Date

Category:
Dates and Math
Type:
Snippets
Difficulty:
Beginning
Author:
Intelligent Solutions Inc.

Version Compatibility: Visual Basic 5

More information:
An example for when you might want to use this code is if you need to calculate the date that is thirty days from the current date. A complete explanation of its use is contained within the comments.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: