dbTalk Databases Forums  

How do I insert a BC date into Oracle?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss How do I insert a BC date into Oracle? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Murali
 
Posts: n/a

Default How do I insert a BC date into Oracle? - 08-06-2008 , 01:21 AM






Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.

-Murali

Reply With Quote
  #2  
Old   
Geoff Muldoon
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 02:28 AM






Murali says...
Quote:
Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.
You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?


Reply With Quote
  #3  
Old   
Geoff Muldoon
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 02:28 AM



Murali says...
Quote:
Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.
You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?


Reply With Quote
  #4  
Old   
Geoff Muldoon
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 02:28 AM



Murali says...
Quote:
Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.
You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?


Reply With Quote
  #5  
Old   
Geoff Muldoon
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 02:28 AM



Murali says...
Quote:
Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.
You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?


Reply With Quote
  #6  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 06:59 AM



On Aug 6, 2:28*am, Geoff Muldoon <geoff.muld... (AT) trap (DOT) gmail.com> wrote:
Quote:
Murali says...

Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.

You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?
That's Julian date 0000001.


David Fitzjarrell


Reply With Quote
  #7  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 06:59 AM



On Aug 6, 2:28*am, Geoff Muldoon <geoff.muld... (AT) trap (DOT) gmail.com> wrote:
Quote:
Murali says...

Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.

You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?
That's Julian date 0000001.


David Fitzjarrell


Reply With Quote
  #8  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 06:59 AM



On Aug 6, 2:28*am, Geoff Muldoon <geoff.muld... (AT) trap (DOT) gmail.com> wrote:
Quote:
Murali says...

Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.

You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?
That's Julian date 0000001.


David Fitzjarrell


Reply With Quote
  #9  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 06:59 AM



On Aug 6, 2:28*am, Geoff Muldoon <geoff.muld... (AT) trap (DOT) gmail.com> wrote:
Quote:
Murali says...

Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.

You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?
That's Julian date 0000001.


David Fitzjarrell


Reply With Quote
  #10  
Old   
Mark D Powell
 
Posts: n/a

Default Re: How do I insert a BC date into Oracle? - 08-06-2008 , 10:19 AM



On Aug 6, 7:59*am, "fitzjarr... (AT) cox (DOT) net" <orat... (AT) msn (DOT) com> wrote:
Quote:
On Aug 6, 2:28*am, Geoff Muldoon <geoff.muld... (AT) trap (DOT) gmail.com> wrote:





Murali says...

Hi,

Let's say I want to insert 104000 BC into a date field in an Oracle
table? How do I do that? Is it as simple as inserting "-104000" into
the date field or is it more complex than that?

Any help would be appreciated.

You can't. The Oracle date data type only goes back to 4712 BC

And it should be inserted using a proper format mask, eg.:

INSERT INTO some_table(some_date_field)
VALUES(TO_DATE('-4712/01/01', 'syyyy/mm/dd'));

Geoff M

Does anyone know why they picked 4712 BC?

That's Julian date 0000001.

David Fitzjarrell- Hide quoted text -

- Show quoted text -
Geoff, if you are really interested into the Oracle date history seach
for THE ORACLE CALENDAR
copyright 2003 by Peter Gulutzan and Trudy Pelzer. Oracle has a year
zero error and its Julian dates do not match those produced by other
systems such as DB2.

HTH -- Mark D Powell --


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.