Hello,
I'm querying my oracle database using different search criteria from the user input. In the database i have a table called Deals and in this table a column field called COBDATE, which is mapped using java.util.Date to the corresponding java class. I can query using any column/attribute but i get errors every time i query by cobdate.
The user input comes in a calendar format that i can pass to String. This String looks like '20050221'. I convert it to java.util.Date using:
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyyMMdd");
java.text.ParsePosition pos = new java.text.ParsePosition(0);
Date currentTime_2 = formatter.parse(cobdate, pos);
I then query where COBDATE property is like currentTime_2, getting errors and not returning anything.
Do you query the database selecting data for a specific date? If so, how do you do it? Do i have to use java.sql.Date?
thanks a lot, help is much appreciated
|