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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to formate date in where clause?

Re: How to formate date in where clause?

From: Michael Rothwell <mike_rothwell_at_non.hp.com>
Date: 2000/06/08
Message-ID: <393FFF99.8EC77C47@non.hp.com>#1/1

try:

select a,b c
from d_table
where trunc( drop_date ) = trunc( sysdate - 1 );

This is a time component in the date field, therefore your query would have to match down to the second.

Michael

Maggie wrote:

> I tried to run a query:
>
> select a,b c
> from d_table
> where drop_date = sysdate - 1;
>
> However, I coundn't get value return even I know there are rows matched to
> the query. I understand there must some way to format date. Can anyone
> help?
>
> Thansk.
> Maggie
Received on Thu Jun 08 2000 - 00:00:00 CDT

Original text of this message

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