SQL Anywhere automatically converts a string into a date when a date value is expected, even if the year is represented in the string by only two digits.
If the century portion of a year value is omitted, the method of conversion is determined by the nearest_century database option.
The nearest_century database option is a numeric value that acts as a break point between 19YY date values and 20YY date values.
Two-digit years less than the nearest_century value are converted to 20yy, while years greater than or equal to the value are converted to 19yy.
If this option is not set, the default setting of 50 is assumed. So, two-digit year strings are understood to refer to years between 1950 and 2049.
This nearest_century option was introduced in SQL Anywhere Version 5.5. In version 5.5, the default setting was 0.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|