Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Managing DATE in FORMS

Managing DATE in FORMS

From: Paolo Dall'Olio <pdallolio_at_kjws.com>
Date: 1997/02/26
Message-ID: <33147016.B8B@kjws.com>#1/1

I'm in trouble for the following problem:

  In a Form (dev/2000 1.3 x win95) I have a DATE field corrisponding to a database DATE field ... when I try to make a query on this field (e.g. 01/02/97), no record is returned (NLS_DATE_FORMAT is set correctly, both on server and client).
  (Similarly in PL/SQL I get nothing if I do: SELECT * from EMP where ins_date='01/02/97';)

I was told from hot line service the problem is the following: a database date value contains (of course) not only the date but also the hour ... so when I try to inquery just by date, I get nothing.

First question: is it true?

Second problem: how to resolve it?

I've got the following two solutions ... but I don't like neither:

1- Do not use DATE field in the database, but only varchar2 (when I'm just interested in the day and not in the hour)

2- in the form, manage the date field in the following manner:

IF :nodb_block.ins_date IS NOT NULL THEN   

Set_Block_Property('block0',DEFAULT_WHERE,'To_Char(ins_date)='''||To_Char(:nodb_block.ins_date)||''''); ELSE
   Set_Block_Property('block0',DEFAULT_WHERE,NULL); END IF; please, answer me directly too

thank you very much in advance Received on Wed Feb 26 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US