Calculate expire date?

expired domain names
sosena asked:

Here is my scenario:
We are working on our domain registration: registration expired in 5 years

I want to calculate the Expiration Date of our domain registration based on the Registration Date plus the Term (which 5 year)
The Term is a number and refers to the number of Year
Can some help me how to add in SQL table

my databse contain 5 table bussinessowner,contactperson,registarr,transfer,domain.

Term and expire date is under Domain table. I have a websit contain the same table name .
recently complet my class and , i can accept any feed back.
Thank you.

Sosena






2 Responses to 'Calculate expire date?'

  1. Socially Correct - August 10th, 2010 at 8:46 am

    When did you file your FBN? (Fictitious Business Names) with the newspaper? Count five years from that. Then re-file.

  2. TheMadProfessor - August 13th, 2010 at 9:30 am

    I’m assuming you meant to say “term and enroll_date is in Domain table”, since you want to derive expire_date. Syntax may vary depending on the DBMS, but this should be something along these lines:

    SELECT DATE_ADD(enroll_date, INTERVAL term YEAR) AS expire_date FROM Domain


Leave a Reply