DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Y2K Date Issue

  1. #1
    Join Date
    Sep 2000
    Posts
    1
    We have bunch of birthdates in our DB that have 2000 as the century instead of 1900. What is the best way to change the century to 1900? I am not aware of an addcentury function or something like that and I don't know if converting it a string and doing a string replacement is the best approach. I apologize if this is a real basic question.

  2. #2
    Join Date
    Nov 1999
    Location
    Elbert, Colorado, USA
    Posts
    81
    No, there is no add_century function. However, there IS an add_months function. So if you need to back up all of your dates by 100 years, then you could try:

    UPDATE my_table SET dob = add_months(dob, -1200);

Posting Permissions

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


Click Here to Expand Forum to Full Width