| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL
Simplest way to do this:
(where clause only)
WHERE datetime between trunc(sysdate) + 6/24 and trunc(sysdate) + 9/24
I assume you need current date. If you need any other date, syntax is the same, just replace sysdate with the date you need.
WK Yeoh wrote:
> Hi,
>
> I have a PL/SQL statement like below:
>
> CURSOR c1 IS
> SELECT *
> FROM xyz
> WHERE datetime between to_date('20-01-02:06:00:00','dd-mm-rr hh24:mi:ss')
> and to_date('20-01-02:09:00:00','dd-mm-rr hh24:mi:ss');
>
> Is there any way I can substitute the date '20-01-02' portion with
> everyday's date instead of hard code it. The time of '06:00:00' is fixed.
>
> Pls help,
> Wk
>
>
>
>
Received on Mon Jan 21 2002 - 15:10:42 CST
![]() |
![]() |