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: Query Date by Time

Re: Query Date by Time

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 06 Nov 2006 10:43:45 -0800
Message-ID: <1162838625.16709@bubbleator.drizzle.com>


Gomer wrote:
> Greetings,
>
> I'm pulling out my hair on this one.
>
> I want to create a query that pulls data by the previous date, between
> the hours 23:00 and 23:30.
>
> I've read through newsgroups for a couple of days, and I've gone
> through my Oracle manuals, to no avail.
>
> Can anyone offer a suggestions or two?
>
> Thanks,
> BKC
A suggestion or two? Ok!

  1. Always post your version.
  2. Always describe the tables
  3. SYSDATE-1 will give you yesterday's date
  4. Concatenate that with the times you want and use the BETWEEN operator.

Four for the price of two.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Nov 06 2006 - 12:43:45 CST

Original text of this message

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