Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Time in a DATE field
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 CorpReceived on Sat Dec 15 2001 - 15:31:45 CST