Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 数据库管理 » 配置数据库 » 数据库选项 » 数据库选项简介 » 按字母顺序排列的选项列表

 

nearest_century 选项 [兼容性]

控制字符串到日期的转换中对两位的年份的解释。

允许值

0 到 100(含)之间的整数

缺省值

50

注释

此选项控制在从字符串转换为日期或时间戳时对两位数年份的处理。

nearest_century 设置为一个用作切换点的数字值。小于该值的两位数年份转换为 20yy,而大于或等于该值的年份转换为 19yy。

在以前,SQL Anywhere 的行为是将年份加上 1900。Adaptive Server Enterprise 的行为是使用最接近的世纪,这样对于那些 yy 值小于 50 的年份就会被设置为 20yy。