Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> to_date/to_char

to_date/to_char

From: <jeanch_at_my-deja.com>
Date: Wed, 29 Mar 2000 16:11:28 GMT
Message-ID: <8bt9ub$4gd$1@nnrp1.deja.com>


Folks,

Why is is that I get different results with the following: DECLARE
d varchar2(50);
BEGIN
d := TO_CHAR(sysdate,'DD-MON-YY HH24:MI:SS'); dbms_output.put_line(d);
END;
>>>29-MAR-00 17:20:50
AND DECLARE
d DATE;
BEGIN
d := TO_DATE(TO_CHAR(sysdate,'DD-MON-YY HH24:MI:SS'), 'DD-MON- YYHH24:MI:SS');
dbms_output.put_line(d);
END;
>>>29-MAR-00
The format is the same in both code:
I was expecting to see the time on both but it's truncated Why y

Cheers
JC

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Mar 29 2000 - 10:11:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US