Re: Specify Date in Forms Query

From: <stevec_at_zimmer.csufresno.edu>
Date: 1998/02/19
Message-ID: <6chv9q$j5s$1_at_nnrp1.dejanews.com>#1/1


In article <34EB83A2.111A_at_mindspring.com>,   Ed Jennings <jenningse_at_mindspring.com> wrote:
>
> I'm writing a FORMS 4.5 app on NT 4.0. I want to allow users to enter a
> date (DD_MON_YY) in the form to qualify the query. However, the query
> never finds any rows, even though I know it exists. I'm certain I'm
> getting burned by the lack of time in the mask, but I don't know how to
> get around it. If I specify a PRE_QUERY trigger with > date_column, it
> works fine. But I want to be able to isolate a specific date, not just
> greater than. Any suggestions???
>
> Ed jenningse_at_mindspring.com

The form query doesn't find the dates because they have a non-zero time values in the server. You can find all of the rows for a single day by entering a colon in the date column and pressing Execute_Query. A Query/Where window will pop up, and you can enter:

   Trunc(date_column)=to_date('DD MON YY') where "date_column" is the actual column name, and "DD MON YY" are changed to a valid date.

An easier method would be to use your PRE-QUERY trigger to add the TRUNC() function to the query on the date column. Trunc tells the query to ignore the time when comparing a date in the database to the value entered for the query.

HTH
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table.

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Feb 19 1998 - 00:00:00 CET

Original text of this message