Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

get error with default date in mysql 0000-00-00

Hello
I would like to create a excel report .
I have to export table from mysql DB
in the table I have date format where the default value is 0000-00-00
Too create my report I use a tMysqlInput
whene I run my job I get an error message
Exception in component tMysqlInput_1
java.sql.SQLException: Cannot convert value '0000-00-00' from column 24 to TIMESTAMP.
at com.mysql.jdbc.ResultSet.getTimestampFromBytes(ResultSet.java:6965)
at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:6999)
at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:6319)
at hbrepport.report.report.tMysqlInput_1Process(report.java:496)
at hbrepport.report.report.main(report.java:754)
I change in the tMysqlInput the default value for date to 1600-01-01 but nothing change
Pls help
DN
Labels (2)
10 Replies
Anonymous
Not applicable
Author

My work around solution:
 1. Change schema type from DATE to String in the tDBInput component

 2. CAST column to  VARCHAR in SQL Query:
    SELECT 
       CAST (column_name as CHAR(32)) as column_name
   FROM table_name

Best Regards.,