Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select a Date and time when you only have a date?
Something like this might do
select whatever
from table2
where datetimefield = to_date( to_char( table1.field, 'dd-mon-yy' ) || '
09:30 am', 'dd-mon-yy hh:mm am';
"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 - 10:52:11 CDT