Re: Select Date field problem

From: Greg Kearney <sticinc_at_mediaone.net>
Date: Tue, 06 Feb 2001 02:10:00 GMT
Message-ID: <Y1Jf6.4772$En4.131568_at_typhoon.jacksonville.mediaone.net>


My program is a calendar application where month/days 1-9 are single digit. When I use
select * from events where
to_char(start_date,'MM')= ?;
the database is looking for two digits. Is there another way to write this statement where the database will understand a single digit?

Greg Kearney <sticinc_at_mediaone.net> wrote in message news:lJDf6.4704$En4.124558_at_typhoon.jacksonville.mediaone.net...
> I having a small problem with an O8i database date field, I'm sure its
> something I did.
>
> Example:
> select * from events where start_date like to_date('02','mm')
>
> This command will pull up only one record, I have 3 Feb records. If I
 change
> the 02 to something else I get nothing, even though I have records. If I
> change the "like" to an "=" I get no records.
>
> Does anybody have any suggests?
>
> Thanks.
>
>
Received on Tue Feb 06 2001 - 03:10:00 CET

Original text of this message