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: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 5 Apr 2006 14:52:09 -0700
Message-ID: <1144273929.219122.92460@z34g2000cwc.googlegroups.com>

cdavis10717_at_comcast.net wrote:
> All,
>
> I can not work out the proper syntax to extract the hour from a date
> column in my table.
>
> Examples I have found select from DUAL, but I want it from a user table
> instead.
>
> An example like:
>
> SELECT extract(hour from my_date_column 'HH24') as TheHour from
> my_table;
>
> doesn't work at all, I get syntax error.
>
> Has anyone done this and can provide working syntax?
> Thanks in advance.
>
> CD

select to_char(your_date_column, 'HH24') from your_table; This is ofcourse all in the docs.

Regards
/Rauf Received on Wed Apr 05 2006 - 16:52:09 CDT

Original text of this message

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