Specifically, I'm trying to determine what to use as the "beginning of
time" and the "end of time" in my Oracle database, which is accessed by
Java applications.
I'm trying to constrain some "from" and "thru" date columns to be NOT
NULL and to default to "the beginning of time" or "the end of time".
This set up makes it very intuitive to ask "is TODAY between FromDt and
ThruDt" without having to handle the vagaries of using NULL in either
column.
I have determined that Oracle is happy to have me use "12/31/9999" as
"the end of time".
Now I'm trying to determine if Java (JDBC) will let me retrieve/store
these dates and use them in my Java processing.
Thanks
R.Parr
Temporal Arts
The date represented by
new Date(Long.MAX_VALUE)
is Sun Aug 17 00:12:55 PDT 292278994.
Yes, Java does have a Y292279K bug.
I figure they won't be able to blame me in more than
a quarter of trillion (.25 x 10^9) years!
For more information about java.util.Date and its relatives see
"Computer Dating" in the FAQ.
The lowest value for some operations (i.e. setting with
day, month, year in a Calendar and I believe creating a string with DateFormat)
was limited to 4713 BC prior to JDK 1.2 (and late 1.1.* releases
that _post_ date 1.2), but you could create an earlier binary date
that was/is comparable.
You might see if Oracle will allow 99999.
Hope that helps,
-Paul
--
Java FAQ: http://www.afu.com/javafaq.html
:)