Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to update a Date Field?

Re: How to update a Date Field?

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 11 Dec 1998 11:43:00 GMT
Message-ID: <74r0g4$vs8$2@news02.btx.dtag.de>


Sean Dolan schrieb:
>
> Somehow in my database table, I have a date field that only has the format '02-NOV-98'. I would like to do an update statement that appends the date with 12:00 PM. I have tried and tried and cannot get the date to accept the hour of time. How do you do it?
>
> Thanks, Sean Dolan
>
> PS If you could, reply to the group or my personal mail: sean_at_3si.com
>
> Thanks Again!

Ever checked the output of:

SELECT
        TO_CHAR(date_column,'DD-MM-YYYY 'HH24:MI:SS') FROM
        your_table;
?

One way to get what you want:

UPDATE
        your_table
SET
        date_column=TRUNC(date_column);

HTH
Matthias
--
Matthias.Gresz_at_Privat.Post.DE

Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm Received on Fri Dec 11 1998 - 05:43:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US