Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sysdate & date columns
Igor V. Podolsky <igoryok_at_soft-review.kiev.ua> wrote in message
news:AASxkXuS806_at_soft-review.kiev.ua...
> <klingfam_at_epix.net> wrote in message news:38867BD5.C9D237AF_at_epix.net...
>
> > Yes,
> > try trunc(date_column) = trunc(sysdate)
> >
> > I do this all the time it takes the time portion off the date and
> > compares just the date .
>
> It works, but indexes couldn't be used. I'd prefer something like
>
> date_column >= sysdate and date_column < sysdate + 1
You should apply the TRUNC() function:
date_column >= trunc(sysdate) and date_column < trunc(sysdate+1) Received on Sat Jan 22 2000 - 18:33:29 CST
![]() |
![]() |