Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how to trunc date column to half an hour

Re: how to trunc date column to half an hour

From: Greg Norris <spikey.mcmarbles_at_gmail.com>
Date: Tue, 6 Mar 2007 15:21:20 -0600
Message-ID: <d4beff360703061321t690dabf9xf75ae4db589faef3@mail.gmail.com>


On 3/6/07, Derya Oktay <deryaoktay_at_gmail.com> wrote:
> Hi All,
> Is there a way of displaying date columns, truncated to half an hours.

Maybe something like:

select case when to_number(to_char(sysdate,'MI')) between 0 and 29

          then trunc(sysdate,'HH')
          else trunc(sysdate,'HH')+(1/48)
       end mydate

   from dual;
-- 
"I'm too sexy for my code." - Awk Sed Fred.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 06 2007 - 15:21:20 CST

Original text of this message

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