Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: **Updating time part**
A copy of this was sent to abhijitde_at_my-dejanews.com
(if that email address didn't require changing)
On Mon, 18 Jan 1999 14:55:53 GMT, you wrote:
>Hi friends,
>
>I have a table containing two fields,
>
>adate date
>atime varchar2(8)
>
>Sample data:-
>
>adate atime
>10-Jan-1999 12:00:00 10:30:50
>10-Jan-1999 12:00:00 13:30:10
>12-Jan-1999 12:00:00 09:30:00
>
>Could anyone let me the syntax for updating time part of field adate
>with atime?
>
>Thanks in advance.
>
update T
set adate = to_date( to_char(adate,'ddmmyyyy') || atime, 'ddmmyyyyhh23:mi:ss' )
should do it. convert the date into a string, concatenate the time onto the string and use to_date to convert the new string with the date and time into a date...
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jan 18 1999 - 09:31:40 CST
![]() |
![]() |