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: extract just the time from a date time field

Re: extract just the time from a date time field

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 12 Mar 2004 12:05:04 -0500
Message-ID: <96Wdncs8PbpQcMzd4p2dnA@comcast.com>

"Noel" <tbal_at_go2.pl> wrote in message news:c2spho$t24$1_at_inews.gazeta.pl...
|
| > Looking for a function that will extract just the time from a date time
| field.
| >
| > Example:
| >
| > 02/19/2004 12:05:32
| >
| > I tried to use trim-trailing but it wont' let me do it on a date field.
| > I want to extract just 12:05:32
| >
| SELECT TO_CHAR(sysdate,'HH24:MI:SS')
| FROM DUAL;
| --
| Noel
|
|

and if you are doing any calculations, you can use

to_number(to_char( the_date_column, 'SSSSS'))

;-{ mcs Received on Fri Mar 12 2004 - 11:05:04 CST

Original text of this message

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