Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to store timestamp in oracle 8.1.7?
Please IGNORE this poster is INCORRECT ; the Oracle DATE type is, in fact, a TIMESTAMP - it has date and time ( to the second) and you use it exactly like a timestamp as long as you enter the data correctly;;
SQL> create table test_dt (
2 mytimestamp date );
Table created.
1* insert into test_dt values (to_date('01012002101023','MMDDYYYY:hh24:mi:ss')) SQL> / 1 row created.
SQL> select to_char(mytimestamp,'MM-DD-YYYY hh24:mi:ss') from test_dt;
TO_CHAR(MYTIMESTAMP)
Please be sure and test before posting...
rs_arwar_at_hotmail.com (Rauf Sarwar) wrote:
>davidchantf_at_hotmail.com (david chan) wrote in message news:<dca7348f.0209251053.1015d2e7_at_posting.google.com>...
>> Hi,
>> How can I store timestamp thing (not just yyyy-Mon-dd, but include
>> time) to oracle 8.1.7? What kind of datatype it will be? (I know there
>> are no timestamp datatype in 817, but in DB2 and oracle 9i) So how to
>> make up this in 8.1.7?
>> Thanks.
>> David
>
>
>You cannot as a DATE datatype. Either you store it as a
>VARCHAR2/NUMBER or goto Oracle 9i which has a TIMESTAMP support.
>
>To generate a TIMESTAMP in 8.1.7 and store it as a VARCHAR2, Use
>java.sql.Timestamp interface via Oracle's Java cartridge.
>
>/Rauf Sarwar
-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
http://www.newsfeed.com The #1 Newsgroup Service in the World! -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =----- Received on Thu Sep 26 2002 - 12:45:27 CDT