RE: update year in date column

  • From: Stephen.Lee@xxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 23 Mar 2004 15:13:43 -0600

Here the original year on a was 2002.

update crap2 set a =
to_date(to_char(a,'MM/DD')||'/'||replace(to_char(a,'YYYY'),'2002','3002'),'M
M/DD/YYYY')

> -----Original Message-----
> Thought I'd be clever and subtract 1000 from the date.
> This works, but I don't know how to get it formatted
> back into a date.
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: