Reading DUMP of DATE field

  • From: "Jesse, Rich" <Rich.Jesse@xxxxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 25 Feb 2004 15:10:29 -0600

Hey all,

I'm trying to see if I can determine the actual date of a DATE column in
8.1.7.4.0 on HP/UX given a DUMP of the column.  When I:

        SELECT DUMP(mydatecol)
        FROM mytab;

I get this from the single row in the table:

        Typ=12 Len=7: 120,104,2,20,1,1,1

From a translated value of "02/20/2004" in that column, I can make some
assumptions as to the 2nd, 3rd, and 4th fields, but the rest baffles me.  I
checked the App Dev manuals on tahiti.oracle.com, but nothing popped out at
me.

The reason I'm checking on this is because of a known bug in OCI that allows
putting values of "0" for every byte in the date field.  This is invalid, of
course, but OCI doesn't check that validity before setting the value of a
date field.  It really causes havoc in other tools, however.  Some display a
date in the 1800s, others blow up.

TIA,
Rich

Rich Jesse                        System/Database Administrator
rich.jesse@xxxxxxxxxxxxxxxxx      QuadTech, Sussex, WI USA
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: