Date problem [message #36044] |
Thu, 01 November 2001 02:33 |
Sheryl
Messages: 6 Registered: November 2001
|
Junior Member |
|
|
Hi!
I want to insert in my database the following :
12/10/2001 10:12:00AM
12/10/3001 10:12:00AM
So when I insert this value I write:
INSERT INTO my_table(my_date)
VALUES ( TO_DATE(' 12/02/2001 10:12:00AM', 'DD/MM/YYYY HH:MI:SSAM') );
INSERT INTO my_table(my_date)
VALUES ( TO_DATE(' 12/02/3001 10:12:00AM', 'DD/MM/YYYY HH:MI:SSAM') );
But when I perform the: Select * from my_table;
appers the following:
A. 12-FEB-01 and not the full 12-FEB-01 10:12:00AM (the hour, minute, sec information did not appear)
B. I could not distinguish the difference between years 2001,3001 because the result of the selection comes as 12-FEB-01 so I do not know when I refer to 2001 or 3001
Any idea what can I do to solve the problem?
I have problems continuing my work due to that problem...
Thank you a lot in advance!
Sheryl
----------------------------------------------------------------------
|
|
|
Re: Date problem [message #36045 is a reply to message #36044] |
Thu, 01 November 2001 03:07 |
pb
Messages: 18 Registered: December 2000
|
Junior Member |
|
|
Type the following before issuing your select statement.
ALTER SESSION
SET NLS_DATE_FORMAT = 'MM/DD/YYYY HH:MI:SS AM';
----------------------------------------------------------------------
|
|
|