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: Select a Date and time when you only have a date?

Re: Select a Date and time when you only have a date?

From: Joanna Liu <joanna_at_ti.com>
Date: Thu, 2 Aug 2001 16:02:16 -0500
Message-ID: <9kcf3k$ckh$1@tilde.csc.ti.com>

Add 57/144 to the date will do.

SQL>select to_char(to_date('07-AUG-2001', 'DD-MON-YYYY')+ 57/144, 'DD-MON-YYYY:HH24:MI:SS') NEW_DATE
from dual;

SQL> / NEW_DATE



07-AUG-2001:09:30:00 Hope this helps.
                                                Joanna




"Bob Maggio" <rmaggio_at_courts.state.ny.usNOSPAM> wrote in message news:3B695517.483FC56A_at_courts.state.ny.usNOSPAM...
> Is there a way to select a date and time from one table, when you only
> have a date?
> I need to be able to select Aug 7, 2001 9:30 am when I only get Aug 7,
> 2001 from the source table.
> I can't trunc the selection becuase I only want to pull records on the
> give date, at 9:30an, so records at 8:30am need to be left out.
> So is there a way to get Aug 7, 2001 from one table, (it completely
> formats to 00:00:00:00 in the time part) and make it Aug 7, 2001 9:30
> before I use ot to select from another table?
> Bob Maggio
> NYS Unified Court System
> rmaggio_at_courts.state.ny.us
>
Received on Thu Aug 02 2001 - 16:02:16 CDT

Original text of this message

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