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: SQL - Updating time, HOW?

Re: SQL - Updating time, HOW?

From: Jeremy Russell <jeremyr_at_no-spam-today-thanks.dircon.co.uk>
Date: Tue, 10 Nov 1998 06:04:49 GMT
Message-ID: <3647d777.1584608@news.dircon.co.uk>


UPDATE mytime SET MASA =

        TO_DATE('04-MAR-99 01:03:00','DD-MON-YY HH:MM:SS') WHERE ... Check out the date formats used by TO_DATE and TO_CHAR.

JR

azhan98_at_tm.net.my wrote:

>I have insert a data into a table with a field datatype of DATE.
>
>SQL> INSERT INTO MYTIME(MASA)
> 2 VALUES('04-MAR-99')
> 3 ;
>
>When I select the data using TO_CHAR, I can see the time for that rows.
>
>SQL> SELECT TO_CHAR(MASA,'DD-MON-YY HH:MI:SS') FROM MYTIME;
>
>TO_CHAR(MASA,'DD-MON-YYHH:MI:SS')
>---------------------------------------------------------------------------
>01-MAR-99 12:00:00
>02-MAR-99 12:00:00
>04-MAR-99 12:00:00
>
>However, I have a problem in updating the row value for both date and time.
>What SQL update command should I type if I want to update the time for
>04-MAR-99 from 04-MAR-99 12:00:00 to become 04-MAR-99 01:03:00
>
>Thanks for your help.
>
>Azman
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Tue Nov 10 1998 - 00:04:49 CST

Original text of this message

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