Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Concatenation
On Tue, 21 Sep 1999 17:03:14 GMT, amerar_at_ci.chi.il.us wrote:
>
>
>Hello,
>
>The field I want to perform this operation on is of type DATE.
>
>I want to give the field a new MMDDYYYY while keeping the same hour and
>minute (HH24MI) from the date.
>
You can do this two ways.
If you know how many day +/- you can do this
update T
set col1 = col1 <+/-> <number of days>;
or if you know the date then you can
update T
set col1 = to_date( '<your date string in MMDDYYYY form>' ||
to_char( col1, 'HH24MI' ), 'DDMMYYYYHH24MI' );
hope this helps
chris.
>Since when you put dates into the table you need the quote the string
>and provide a format, I'm not sure how to accomplish my above task. The
> month and day and year can be quoted, but the hour and minute will come
>from the existing value in that field.......
>
>any help would be appreciated.
>
>Arthur
>amerar_at_ci.chi.il.us
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.
![]() |
![]() |