Re: DateTime Question

From: Chandra Pabba <Chandra.Pabba_at_sabre.com>
Date: 2000/06/19
Message-ID: <394E4EC6.F56C035A_at_sabre.com>#1/1


Hi Phillip

Use the following in order to insert both the date and the time component:

INSERT INTO TEST (MyDate) values (to_date('19-JUN-99 15:45:04', 'DD-MON-YY HH24:MI:SS'));

HTH Thanks

Chandra

"Phillip X. Fei" wrote:

> I have a table with two fields:
>
> EventDateTime Date not null
> EventDesc varchar(500) not null
>
> when I insert a record in either of the following two queries, it gives
> error.
>
> Insert into MyEvent values ('6/14/00 2000, 15:45:04', 'test');
>
> or:
>
> Insert into MyEvent values (TO_DATE('6/14/00 2000, 15:45:04'), 'test');
>
> What is the correct syntax to insert both date and time into one Date
> field?
>
> Thanks
Received on Mon Jun 19 2000 - 00:00:00 CEST

Original text of this message