Strange behavior of TO_CHAR with DATE argument.
we have a table with attributes of the DATE type. When running an application, there seemed to be a problem with the values in these attributes.
I started to investigate and found out that some of the values behaved strangely in that when TO_CHAR was applied to them, zero result was obtained:
SQL> select konecobdobi,dump(konecobdobi) from idb_pub.vyplacenenem
where to_char(konecobdobi,'DD.MM.YYYY')='00.00.0000' and rownum<5;
17.11.2009 Typ=12 Len=7: 120,109,11,17,16,123,23
13.12.2009 Typ=12 Len=7: 120,109,12,13,16,123,23
29.11.2009 Typ=12 Len=7: 120,109,11,29,16,123,23
09.11.2009 Typ=12 Len=7: 120,109,11,9,16,123,23
What baffles me is the last but one value, 123, which should be the number of minutes and so less or equal to 59.