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 22:35:08 GMT
Message-Id: <pan.2006.04.06.22.35.11.575425@sbcglobal.net>


On Thu, 06 Apr 2006 06:21:38 -0700, matthew wrote:

> SQL> select extract(hour from cast(sysdate as timestamp)) from dual;
> 15

That is an unusual solution. My solution would be something like:

select to_char(sysdate,'HH24') from dual;

I like your solution better.

-- 
http://www.mgogala.com
Received on Thu Apr 06 2006 - 17:35:08 CDT

Original text of this message

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