ENTERING THE TIME [message #39106] |
Sun, 16 June 2002 23:27 |
adeel
Messages: 4 Registered: June 2002
|
Junior Member |
|
|
IT DOES NOT SAVING THE TIME IN TIME FORMAT IN SQL
IT SHOWS DATE INSTED OF TIME.
BUT IT SHOWS THE TIME IN DEVELOPER FORMS
|
|
|
Re: ENTERING THE TIME [message #39108 is a reply to message #39106] |
Mon, 17 June 2002 02:52 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Oracle stores both date AND time in a date field. This is the reason why date comparison is such a tricky thing, you have to take account of the time part as well.
In your case, you have to convert the date format to time. In the code below, I've changed the standard date format for this session.
Look at the following example:
SQL> select sysdate from dual;
SYSDATE
-----------
17-JUN-2002
SQL> select to_char(sysdate,'HH24:MI:SS') "sysdate" from dual;
sysdate
--------
12:36:08
SQL> alter session set nls_date_format = 'HH24:MI:SS'
2 /
Session altered.
SQL> select sysdate from dual;
SYSDATE
--------
12:36:31
SQL>
HTH,
MHE
|
|
|