Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Date Exception

hai to every one ,

i getting error while getting data from database.

i used the data dictionary prospective devloped table.

and inserted data to table. in that i have the date field.

i assigned in that as type = Date

then i wriiten method in java to retrive the data by Date criteria it showing Error like as follow.

i used the date type in java as Java.sql.date.

when assigned to TaskDate in dictionary date type.

what i need to do help me. pl

The SQL statement "SELECT * FROM "TASK_DETAILS" WHERE "TASK_RECEIPT_DATE" = '2008-09-24' ORDER BY 1,2" contains the semantics error[s]: - 1:34 - type check error: the left hand side >>"TASK_DATE"<< (DATE) and the right hand side >>'2008-09-24'<< (CHAR) of a comparison operator are not comparable

replied

Hi,

I understand that you do not need currentDateTime...the code snipet is just an example how you can pass the SQL Date.

Further you can initialize the SQL Date object as

Date sqlDateObject = new Date(utilDateObject.getTime());

-Ashutosh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question