Re: Question: Update Year for a Date Field
From: John Blackburn <jb2_at_qdot.qld.gov.au>
Date: 1996/01/10
Message-ID: <4cvmk9$5e0_at_camelot.qdot.qld.gov.au>#1/1
Date: 1996/01/10
Message-ID: <4cvmk9$5e0_at_camelot.qdot.qld.gov.au>#1/1
Mai (mai_at_MCS.COM) 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-MMM-94???
: 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!!
try
select to_date(to_char(your_date,'DD-MON')||'-94','DD-MON-YY') from dual;
-- John Blackburn Phone: +61 7 32534634 jb2_at_qdot.qld.gov.au Fax: +61 7 38541194 "Please enclose a stamped, self-addressed ethernet packet with all correspondence..." #include <std_disclaimers.h>Received on Wed Jan 10 1996 - 00:00:00 CET