Problem with Date in View Criteria
801614Mar 23 2011 — edited Mar 24 2011I have installed JDev 11.1.1.4 and I use JSF.
In Oracle database I have defined a field as type DATE. In Entity Object I have the same field defined as oracle.jbo.domain.Date. In "View Criteria" into "View Object", I use this field in "Criteria Item" with 2 "Bind Variables" for BETWEEN SQL statement.
The names of "Bind variables" are startDate and endDate and I defined as oracle.jbo.domain.Date.
<ViewCriteriaItem
Name="Vardatetime"
ViewAttribute="Vardatetime"
Operator="BETWEEN"
Conjunction="AND"
Required="Optional">
<ViewCriteriaItemValue
Name="ViewCriteria_vcrow23_Vardatetime_vcval0"
Value=":startDate"
IsBindVarValue="true"/>
<ViewCriteriaItemValue
Name="ViewCriteria_vcrow23_Vardatetime_vcval1"
Value=":endDate"
IsBindVarValue="true"/>
</ViewCriteriaItem>
<Variable
Name="startDate"
Kind="viewcriteria"
Type="oracle.jbo.domain.Date"/>
<Variable
<Variable
Name="endDate"
Kind="viewcriteria"
Type="oracle.jbo.domain.Date"/>
<Variable
Into index.jspx I dragged, from "Data Controls", ADF Query panel with Table. When run index.jspx and I complete fields startDate and endDate with current date for both (03-23-2011) I get no rows back, because the field into Database contains DATE AND TIME and startDate and endDate are 03-23-2011 00:00:00. How can I fix this?
Thanks