NEAREST_CENTURY option [TSQL]

Controls the interpretation of 2-digit years, in string to date conversions.

Allowed Values

0 – 100

Default

50

Description

NEAREST_CENTURY controls the handling of 2-digit years, when converting from strings to dates or timestamps.

The NEAREST_CENTURY setting is a numeric value that acts as a rollover point. Two-digit years less than the value are converted to 20yy, whereas years greater than or equal to the value are converted to 19yy.

Adaptive Server Enterprise and Sybase IQ behavior is to use the nearest century, so that if the year value yy is less than 50, then the year is set to 20yy.