cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

org.joda.time.LocalDateTime error for DB2 Insert

Sanssnap
New Contributor II

Hi, I had an issue with DateTime conversion issues Insert records when migrating data from MySQL to DB2.

MYSQL dateformat : 2022-03-17 05:10:10
DB2 timeformat 2022/03/17 05:10:10

I am getting the following error

Failure: SQL operation failed, Reason: Type class org.joda.time.LocalDateTime is not supported in dialect DB2, Resolution: Please check for valid Snap properties and input data.

could some one let me know what is transofrmation I need to do for MySQL to DB2.

from DB2 to MySQL i used substring to parse and concatenate and the same is not working from MySQL to DB2.

Thank you,
sandy.

4 REPLIES 4

bojanvelevski
Valued Contributor

Try parsing the date into the specific format:

Date.parse('2022-03-17 05:10:10','yyyy-MM-dd HH:mm:ss').toLocaleDateTimeString({'format':'yyyy/MM/dd HH:mm:ss'})

Sanssnap
New Contributor II

Thank you, bojanvelenski.

Is there any snap for DB2 bulkupload which is similar to MySQL

when migrating the data from DB2 MySQL , i have used Bulkload snap and it mapped the columns automatically.

when I am doing the revese sync mapping , I dont see the Bulk load snap for DB2 โ€ฆand compain about th other columns which are are part of the table definition present in the Mapper.

is there any snap which is equivalent to MySQL bulk upload for DB2.

bojanvelevski
Valued Contributor

Frankly, Iโ€™ve never worked with DB2. Which snaps did you use for reading from DB2 ?

Generic JDBC snaps