Results 1 to 3 of 3

Thread: [RESOLVED] update years from 190x to 200x

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    Resolved [RESOLVED] update years from 190x to 200x

    I had some dates that got imported incorrectly and I need to update them. It assumed everything that came in as xx/xx/0x was xx/xx/190x. How do I update the years in all those fields to be 200x??
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    Re: update years from 190x to 200x

    Nevermind. I got it:

    "UPDATE CompRemoved SET DateRemoved = DateAdd(year, 100, DateRemoved)"

    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: [RESOLVED] update years from 190x to 200x

    something like this should work for Sql Server:
    tabledate = dateadd(year,100,tabledate)

    edit:
    too slow

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