Re: Specify Date in Forms Query
Date: 1998/02/20
Message-ID: <01bd3db0$d2e7ffc0$45f11286_at_itwol-pc3963.itwol.bhp.com.au>#1/1
Ed,
If the time is irrelevant then avoid the problem by ensuring the date is inserted with a time of 00:00.
If this is not possible, try 'between date and date + .9999'. This
encompasses 00:00 to 23:59.
Looks unattractive, but it works.
BTW, to avoid Y2K and invalid format problems consider: '#between to_date(''' || to_char(query_date, 'DD-MON-YY') || ''',
''DD-MON-RR'') AND to_date(''' || to_char(query_date + .9999, 'DD-MON-YY') || ''', ''DD-MON-RR'')'
/* Cater for bad date entered by user. */ EXCEPTION
WHEN Value_Error
THEN
/* Avoid Unhandled Exception error. Forms then displays it's own message. */
null;
Which, I'm sure you'll agree, looks even worse. I'd be pleased to hear of a more elegant solution myself.
Ed Jennings <jenningse_at_mindspring.com> wrote in article
<34EB83A2.111A_at_mindspring.com>...
> 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
>
>
Received on Fri Feb 20 1998 - 00:00:00 CET