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

Home -> Community -> Usenet -> c.d.o.server -> help with date insertions

help with date insertions

From: Yousaf <noway_at_hose.com>
Date: Thu, 27 Nov 2003 19:25:21 +0000
Message-ID: <1069960884.746886@ananke.eclipse.net.uk>


Dear all,

I have written a post earlier about having trouble with the dates in Oracle, I have followed what I was told.

I am inserting a record via ASP, and in the query I insert the date with the TO_DATE function, here is what I am doing:

INSERT INTO RISK(RISK_NO, USER_ID, DESCRIPTION, RAISED_BY, LOG_DATE, IMPACT, OWNER, RESOLUTION, STATUS, EXPECTED_CLOSURE_DATE, CLOSED_DATE, ADDITIONAL_OWNER, OTHER_OWNER) VALUES(RISK_NOSeq.nextval, 'DUFFYA' ,'this is a test','MOOREK23', SYSDATE, 'H', 'HILLJE', '-','O', TO_DATE('04-MAR-2003', 'DD/MON/YYYY'), TO_DATE('09-AUG-2015','DD/MON/YYYY') ,'N', '-')

After performing this insert via ASP, using SQL Plus I check the date:

SQL> select EXPECTED_CLOSURE_DATE from risk where risk_no = 71;

EXPECTED_



04-MAR-03 Which is wrong as clearly in the TO_DATE function I want it to store in YYYY format, so it should appear as 2003, not 03.

Also when I retrieve the same record in ASP and display it on the screen it shows me the same date as following:

3/4/2003

Could anyone tell me what is going on here???

Thanking you in advance.

-- 
Yousaf
Linux version 2.4.20-8  
gcc version 3.2.2
Red Hat 9
Received on Thu Nov 27 2003 - 13:25:21 CST

Original text of this message

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