View Single Post
 
Old November 22nd, 2005, 05:39 PM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Say, I am curious about this expression:

DateSerial(Year([RenewDate])+1,Month([RenewDate]),Day([RenewDate])-1)

What if the Renew Date is December 1, 2005? Your expression will evaluate to:

December 0, 2006

How does that get resolved in Access? Do you get any errors? Wouldn't a safer expression be:

DateAdd("d", -1, DateAdd("yyyy", 1, [RenewDate]))


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division