How does Sql Server tell that you sent in 4 digit year

  • We have SQL Server 2000 on a production and a test server. They are same versions and have the same application installed on each server.

    When user enters a date of birth with a 4 digit year it enters correctly on test (eg.1948). But when entered on production, using the whole 4 digit year, it shows up as 2048. Somehow SQL Server sees it as coming in as only 2 digit year and uses its' century default.

    What setting can we check/fix so that when entered as 1948 SQL Server will interpret it as 1948. I don't see any differences between our test and production environments, and it works correctly in test.

    Thanks very much for any ideas.

  • Run:

    sp_configure 'two digit year cutoff''

    on each database examine the values

    name minimum maximum config_value run_value

    ----------------------------------- ----------- ----------- ------------ -----------

    two digit year cutoff 1753 9999 2049 2049

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • I ran sp_config as suggested and got the same results as you showed in your example in both prod and test databases. Thanks for the idea, anything else??

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

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