Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problems combining a date and a character time field
Barry,
You can try this:
Insert into (MyDate,...) Values (
TO_DATE( TO_CHAR(date_field,'YYYYMMDD')||' '||time_fld,'YYYYMMDD HH:MI:SS'),
...
)
Make sure that your time_fld is in HH:MI:SS format.
For other formats please look in Oracle docs under TO_DATE or TO_CHAR
HTH
Thomas
"Barry" <barryw_at_gmisystems.com> wrote in message
news:8cdtdg$392$1_at_nnrp1.deja.com...
> I'm having problems combining a Date field with a Time which is
> stored in a varchar2(10) field to make an integrated Date field.
> I've tried things like TO_CHAR(date_field,'DD-MMM-YYY') || Time_fld
> which looks alright in a 'SELECT' but refuses to INSERT INTO a Date
> field.
>
> I'd appreciate any suggestions.
>
> TIA
>
> Barry
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Apr 05 2000 - 00:00:00 CDT