You'll need to tell the database what you want to search on. There are a
number of ways to do that. What you probably want is something like this:

SELECT your columns
FROM  your table
where to_char(event_date, 'dd-mon-yyyy') = to_date('05/03/2004',
'mm/dd/yyyy')

This assumes that you're using the 'dd-mon-yyyy' date format as your
standard oracle date format.

(The to_date on the right side of the equation is turning the string into a
standard date format. The to_char on the left side is dropping the time from
the date format.)

----- Original Message -----
From: "Daniel Kessler"
Subject: date search

> I am having a bit of trouble doing a date search on form entered data.
> Originally, I created a date with CreateDate and submitted it, then
> searched on it with a date created the same way (using  WHERE
> event_date = #show_event_date#) and all was great.
>
> Then I was told to also collect the time.  Who knew that events would
> need start times too?  So, instead of createDate, I went to
> createDateTime.  Since then, I've not been able to search on these
> items with my query that uses CreateDate.  It doesn't seem right to
> have to include the time for searching, especially since I just want
> items on a particular date or series of date.
> I'm not sure how to go about forming a query on this, really.
>
> --
> Daniel Kessler
>
> Department of Public and Community Health
> University of Maryland
> Suite 2387 Valley Drive
> College Park, MD  20742-2611
> 301-405-2545 Phone
> www.phi.umd.edu
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to