Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> to_date/to_char
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