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

Home -> Community -> Usenet -> c.d.o.server -> Re: Time in a DATE field

Re: Time in a DATE field

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 15 Dec 2001 13:31:45 -0800
Message-ID: <9vgfg10v9e@drn.newsguy.com>


In article <3C1BADF1.1000103_at_cavtel.net>, Paul says...
>
>I use SYSDATE all the time to auto-populate date fields
>in various tables. Both through the use of the DEFAULT function
>on a column definition and through the use of Triggers applied to
>tables. Until now it was not necessary to save the exact time of
>a given transaction, only the date.
>I know that using the TO_CHAR function and formating I can get the
>time out of SYSDATE " select TO_CHAR(sysdate,'fmHHMMSS') from dual; "
>but how do I put this time back into a date field?
>
>Help, how can I change the load of a DATE field to save the time
>of the transaction by making use of the function SYSDATE?
>

sysdate always has the time component. Its there. you just need to use a date format when you select it out that shows it.

>Thanks for any assistance.
>
>Paul Teague
>
>

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Sat Dec 15 2001 - 15:31:45 CST

Original text of this message

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