Converting java.sql.Timestamp to database parameter for between clause.
posted 3 years ago
I have a query which returns a timestamp. I want to use this in the between clause. I am using java on DB2 database.
Something like this
Col1_timestamp between col2_timestamp and col3_timestamp.
Both col2_timestamp and col3_timestamp are java.sql.Timestamp variables. I want to convert these java variables to database acceptable timestamp format.
Hope someone can help me in this...