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: Joel Garry <joel-garry_at_home.com>
Date: 7 Apr 2006 16:16:55 -0700
Message-ID: <1144451815.636810.78880@j33g2000cwa.googlegroups.com>

Mladen Gogala wrote:
> 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.

Sounds like time for an obfuscated sql contest. I don't mean the security feature, of course.

jg

-- 
@home.com is bogus.
http://www.slashnot.com
Received on Fri Apr 07 2006 - 18:16:55 CDT

Original text of this message

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