Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: date question
Those who don't learn from history are doomed to repeat it.
You were not hired between those 2 dates.
You might ask yourself what dates those are? Do you mean Feb 20, 81 to May
1, 81 or
Feb 20, 1981 to May 20, 1981 or Feb 20, 2002 to May 1 2002?
You didn't specify. You should specify the century!
select ename, job, hiredate
from emp
where hiredate between 'to_date('20-FEB-1981','dd-mmm-yyyy') and
to_date('01-MAY-81',''dd-mmm-yyyy');
(also if you are programming an application use bind variables. Jim
"Helen Pai" <hpya78_at_postoffice.pacbell.net> wrote in message
news:3CA6206C.D7F8CC05_at_postoffice.pacbell.net...
> Hello,
>
> why my hiredate didn't show anything?
>
>
> SQL> select ename, job, hiredate
> 2 from emp
> 3 where hiredate between '20-FEB-81' and '01-MAY-81';
>
> no rows selected
>
Received on Sat Mar 30 2002 - 14:56:47 CST
![]() |
![]() |