Re: Date of 01-01-9999?

From: Jeff Boes <j.boes_at_zds.com>
Date: 1996/02/01
Message-ID: <4er0st$1iqi_at_cass.ma02.bull.com>#1/1


>We have a canned application which has somehow entered a value of
>'01-01-9999' in an Oracle 7.0 database (HP-UX). That is, we can do a

As a follow up to my own post, here's some more evidence:

As you can see, the date field converts via to_char nicely.

SQL> select to_char(t$date, 'mm/dd/yyyy') 2 from tdilc101
3 where t$item = 'ZCR-1730-RO';

TO_CHAR(T$DATE,'MM/DD/YYYY')



01/01/9999

It also converts to a Julian date.

1 select to_char(t$date, 'j')
2 from tdilc101
3* where t$item = 'ZCR-1730-RO'
SQL> / TO_CHAR(T$DATE,'J')



1931076

But if you take that Julian date and convert it back to MM/DD/YYYY:

1 select to_char(to_date('1931076', 'j'), 2* 'mm/dd/yyyy') from dual SQL> / TO_CHAR(TO_DATE('1931076','J'),'MM/DD/YYYY')



12/31/0574
--
~~~~~~~~~~~~~~~~|Words herein are mine, not my employer's.
Jeffery Boes    |"Einstein argued that there must be simplified explanations
Database Analyst| of nature, because God is not capricious or arbitrary.  No
j.boes_at_zds.com  | such faith comforts the software engineer."  --Fred Brooks
Received on Thu Feb 01 1996 - 00:00:00 CET

Original text of this message