Re: **Updating Time part**

From: Rick <Rick.UK_at_nospam.btinternet.com>
Date: Thu, 21 Jan 1999 15:11:28 -0800
Message-ID: <36A7B420.494D_at_nospam.btinternet.com>


Jonathan Samuel wrote:
>
> I am not convinced this syntax is going to work as is.
> Has anyone tested it?
> I think
> SET adate = TO_DATE(TO_CHAR(adate,
> 'DD-MON-YYYY')||a_time,'DD-MON-YYYYHH:MI:SS)
> would be better.
>
> >UPDATE table
> > SET adate = TO_DATE(TO_CHAR(adate, 'DD-MON-YYYY')||a_time)
> > WHERE .....;
> >
> >Rick
>
> My alternative suggestion woud be:
> UPDATE table
> SET adate = adate + to_number(a_time - trunc(a_time)))
> WHERE .....;
> ... assuming a_time is stored as a DATE variable.
>
> Jonathan
Woops
I think you might be right Jonathan, but make it an HH24 instead of HH.

He did say the time was a VARCHAR2(8) variable though, not a DATE.

Rick Received on Fri Jan 22 1999 - 00:11:28 CET

Original text of this message