Re: How To Compare Date with Just the Day of Month




"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


.



Relevant Pages

  • Re: POLL: Giambi - Juiced or Not?
    ... > This is regardless of whether or not it's been proven, ... > just your own speculation, no more, no less. ... Jim ... Prev by Date: ...
    (alt.sports.baseball.bos-redsox)
  • RE: SUMPRODUCT
    ... Jim ... > is it just the AN column array you are having problems with, ... Regardless of how I try to do it, I can’t copy it to any ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: My whinge to Pacific.......
    ... > regardless of whether there's any new chat or not. ... Prev by Date: ...
    (rec.gambling.poker)
  • Re: Problem with transport??? Received date not registered on saved message.
    ... Jim ... >> The problem is that the Category dialog comes up regardless of the ... > fldDestination is a MAPIFolder object, ... >> executes if there is a value for this variable ...
    (microsoft.public.outlook.program_vba)
  • Re: New CEO?
    ... Their software sales were poor and ... thus ensuring that the investors still ... And that might have been the best he could do; but regardless of the ... I don't have any idea if Jim is capable or not. ...
    (borland.public.delphi.non-technical)