Quote:
Originally posted by Naweed
how do I do a
update sysdate -1
on a table column and still keep the date formatt
'MM/DD/YYYY HH24:MI S'.
this is killing me.
I keep getting the following format after the "update sydate - 1"
DD-MON-YY
it works fine for dual but not any other table.
help!!
|
-Are you inserting into another date column?
if YES then you just need to change the way your are displaying your date.
SQL> alter session set nls_date_format = 'MM/DD/YYYY HH24:MI

S';
Session altered.
SQL> select sysdate-1 from dual;
SYSDATE-1
-------------------
12/21/2003 13:46:42
If you want to convert the date in the format 'MM/DD/YYYY HH24:MI

S' to a character field then do the following
SQL> select to_char(sysdate-1,'MM/DD/YYYY HH24:MI

S') from dual;
TO_CHAR(SYSDATE-1,'
-------------------
12/21/2003 13:45:34
I hope this helps
Edwin