Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005

    Unanswered: Finding the Expiration Date

    I have a table containing several date fields in which certain events happened, and I need to be able to find the expiration date for renewal. The expiration dates are at the end of the 6th, 12th, or 24th month after the event occurred, depending on the event.

    Is there a way to return in a query the last day of month x following a date field? For instance, if the date '3/12/2006' is stored in the field for a 12-month expiration, I need to return '3/31/2007'.

    Any ideas?

  2. #2
    Join Date
    Feb 2003
    you can use a query that adds 13 months to the given date and then substract the number of days from it to get it like

    select dateadd(mm,13,'20060312') - datepart(dd,'20060312')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts