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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: select with between date/time

Re: Q: select with between date/time

From: Anurag Varma <avdbi_at_hotmail.com>
Date: 29 Aug 2001 13:08:53 -0700
Message-ID: <7171ca2d.0108291208.6d1778f0@posting.google.com>


"Spencer" <spencerp_at_swbell.net> wrote in message news:<nl_h7.96$3x3.95666_at_nnrp3.sbc.net>...
> FYI, you don't need the TO_CHAR and TO_DATE
> functions, use the TRUNC function instead. e.g.
>
> today4am DATE := TRUNC(SYSDATE)+4/24;
> yesterday7pm DATE := TRUNC(SYSDATE)-5/24;
>
> "Anurag Varma" <avdbi_at_hotmail.com> wrote in message
> news:7171ca2d.0108251832.4187b992_at_posting.google.com...
> > In PL/SQL
> > DECLARE
> > today4am DATE := TO_DATE(
> > to_char(sysdate,'mmddyyyy') || '04:00:00', 'mmddyyyy
> hh24:mi:ss');
> > yesterday7pm DATE := today4am - 9/24;

Correct. Good catch.
What was I thinking?? :)

Anurag Received on Wed Aug 29 2001 - 15:08:53 CDT

Original text of this message

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