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: How To Extract Hour From A Date Column In A Table?

Re: How To Extract Hour From A Date Column In A Table?

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Thu, 06 Apr 2006 05:02:49 GMT
Message-Id: <pan.2006.04.06.05.02.49.277800@sbcglobal.net>


On Wed, 05 Apr 2006 14:41:10 -0700, cdavis10717 wrote:

> SELECT extract(hour from my_date_column 'HH24') as TheHour from
> my_table;

This will not give you a syntax error:

SELECT 'extract(hour from '||my_date_column||' HH24)' as TheHour from my_table;

-- 
http://www.mgogala.com
Received on Thu Apr 06 2006 - 00:02:49 CDT

Original text of this message

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