From 029dfdf1157b6d837a7b7211cd35b00c6bcd767c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 7 Sep 2011 09:47:51 -0400 Subject: Fix to_date() and to_timestamp() to handle year masks of length < 4 so they wrap toward year 2020, rather than the inconsistent behavior we had before. --- doc/src/sgml/func.sgml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index c03dd6c8a3e..0b6a109432e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -5548,6 +5548,15 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); + + + If the year format specification is less than four digits, e.g. + YYY, and the supplied year is less than four digits, + the year will be adjusted to be nearest to the year 2020, e.g. + 95 becomes 1995. + + + The YYYY conversion from string to timestamp or -- cgit v1.2.3