Add interval in dates

  • Hi

    I got a small query problem:

    I have a submissionDate and i have an expiryDate field. I want to automatically calculate one year from the submissionDate and enter it into the expiryDate.

    expiryDate = CDate(Date Add(DateInterval.Day, 364, submissionDate))

    For 1-Jan-07 the expiry date will be 31-Dec-07, the problem comes on other days 25-Feb-07 gives 23-Feb-08 rather than 24-Feb-08

    Any help will be appreciated.

    Thanks

  • HI,

    Try this ..

    select DateAdd(year, 1, '29-feb-2008') expiryDate

    Osama

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply