Recently we migrated java code to OCI environment from AWS environment. Below is the code which is giving issue.
sql.addSQLToWhereClause(XXXTable, "? between table1.start_date and table1.end_date")
.addSQLToWhereClause(YYYTable, "table1.ORG_ID = ? ")
.addSQLToWhereClause(XXXTable, "table1.LANG_CODE = ? ")
.bind(new Date())
.bind(ConstValues.ORG_ID)
.bind(locale.toString().toUpperCase());
In AWS environment it is working fine, but in OCI environment we are getting error: ORA-01830: date format picture ends before converting entire input string
We are getting this error because .bind(new Date()) is putting '07-JAN-2021 10:49:04' in the first parameter. But expected value is '07-JAN-2021'
Please suggest why this additional information is coming in current date and how can we remove it without changing java code.
Thanks Rahul