Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add 4 years less 1 day to a date

Status
Not open for further replies.

nihalwiks

MIS
Mar 6, 2003
1
US
I need to calculate the Warranty Expiration Date (Which is the Installation date + (1 day less than 4 years). How do I do this. Thanks in advance for your help
 
nihalwiks, this will do the trick

Dim vDate as Variant
Dim dteStartDate as Date
Dim dteEndDate as Date

dteStartDate = [YourInstallationDate]

vDate = DateAdd("m",48,dteStartDate)
vDate = DateAdd("d",-1,vDate)
dteEndDate = vDate

regards

Scot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top