Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How To Extract Hour From A Date Column In A Table?
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.comReceived on Fri Apr 07 2006 - 18:16:55 CDT