Re: Question: Update Year for a Date Field
From: Robert C. Nix <rnix_at_us.oracle.com>
Date: 1996/01/04
Message-ID: <30EBF85A.2B3F_at_us.oracle.com>#1/1
Date: 1996/01/04
Message-ID: <30EBF85A.2B3F_at_us.oracle.com>#1/1
Mai wrote:
>
> Does anyone know the SQL statements/functions to update Year for a DATE field in a table on Oracle???? i,e, update the value of a field from dd-MMM-95 to dd-MM
> Without changing the values of Month and Day...
>
> If you have an answer Please post or email me at mai_at_mcs.com.
>
> Thanks a lot!!
update <table>
set THEDATE = THEDATE - to_number(to_char(to_date('31-dec-94'),'DDD')) where to_char(THEDATE,'YYYY') = '1995';
-- _________________________________________________ Robert C. Nix Oracle Tools Support rnix_at_us.oracle.com DISCLAIMER: The thoughts, opinions, remarks, suggestions, ... expressed herein are my own and in no way should be taken as a statement from Oracle Corporation. I am NOT the voice of Oracle (not even close!).Received on Thu Jan 04 1996 - 00:00:00 CET