Re: How To Compare Date with Just the Day of Month
- From: "Jim Kennedy" <kennedy-downwithspammersfamily@xxxxxxxxx>
- Date: Thu, 28 Jul 2005 06:37:52 -0700
"Rhugga" <chuck.carson@xxxxxxxxx> wrote in message
news:1122557420.795340.5200@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> I have the following date inserted into a DATE field: 07-26-2005
> 21:00:00
>
> I have some code where I want to see if this date is equal to
> 07-26-2005, regardless of the time of day.
>
> This is not working form me:
> WHERE bcv_start = to_date('$bcv_sdate[$j]', 'MM-DD-YYYY')
>
> (The value of $bcv_date is correct, I have check that several times)
> Thx,
> CC
>
use trunc(bcv_start) trunc on a date removes the fraction of a day and
makes it midnight of that day which to_date('$bcv_sdate[$j]', 'MM-DD-YYYY')
is. If it is slow then use a function based index on that field.
Jim
.
- References:
- How To Compare Date with Just the Day of Month
- From: Rhugga
- How To Compare Date with Just the Day of Month
- Prev by Date: Re: How To Compare Date with Just the Day of Month
- Next by Date: Re: Example for Advanced Queue
- Previous by thread: Re: How To Compare Date with Just the Day of Month
- Next by thread: Question - RMAN 8i - Catalog or control file?
- Index(es):
Relevant Pages
|