Re: Querying date fields
Date: 23 Sep 1998 04:15:08 GMT
Message-ID: <01bde6a8$c02b4f80$483c1286_at_itwol-pc3963.itwol.bhp.com.au>
Scott,
Try COPY'ing the following string back into your DATE field (after
generating Start Date and End Date):
#BETWEEN TO_DATE(''' || TO_CHAR(Start Date, 'DDMMYYYY HH24:MI:SS') || ''',
''DDMMYYYY HH24:MI:SS'') AND TO_DATE(''' || TO_CHAR(End Date, 'DDMMYYYY
HH24:MI:SS') || ''', ''DDMMYYYY HH24:MI:SS'')
These are all single quotes.
If the date is entered by the user during enter query then you will need to
validate it first.
Try:
TO_DATE(Name_In('Your Date')); --no format specifier
EXCEPTION
WHEN Value_Error
/* Avoid Unhandled Exception error. Forms then generates it's own message. */
null;
END;
Scott Donaldson <scott_donaldson_at_mail.amsinc.com> wrote in article
<3607c15d.0_at_dns.amsinc.com>...
> Is there any way in forms to query a date field using > date or < date.
I
> have already used the copy built-in in my prequery trigger to query a
date
> between 00:00:00 and 24:59:59 due to the date field containing a time
stamp
> and the the user only knowing the date of the field.
>
> -Scott Donaldson
> AMS
> scott_donaldson_at_mail.amsinc.com
Received on Wed Sep 23 1998 - 06:15:08 CEST
