kettle报错couldn't convert string [1970-01-01 00:00:00] to a date using format [yyyy/MM/dd HH:mm:ss.SS

报错的主要内容如下,意思很清楚,就是不能报那个日期字符串转化成日期,可是,很明显,格式是正确的

2020/04/10 15:12:12 - 插入 / 更新.0 - ERROR (version 8.2.0.0-342, build 8.2.0.0-342 from 2018-11-14 10.30.55 by buildguy) : Error in step, asking everyone to stop because of:
2020/04/10 15:12:12 - 插入 / 更新.0 - ERROR (version 8.2.0.0-342, build 8.2.0.0-342 from 2018-11-14 10.30.55 by buildguy) : org.pentaho.di.core.exception.KettleValueException: 
2020/04/10 15:12:12 - 插入 / 更新.0 - Date : Unable to compare with value [String(100)]
2020/04/10 15:12:12 - 插入 / 更新.0 - 
2020/04/10 15:12:12 - 插入 / 更新.0 - birthdate_1_1 String(100) : couldn't convert string [1978/01/06 00::00:00.000] to a date using format [yyyy/MM/dd HH:mm:ss.SSS] on offset location 14
2020/04/10 15:12:12 - 插入 / 更新.0 - 1978/01/06 00::00:00.000
2020/04/10 15:12:12 - 插入 / 更新.0 - 
2020/04/10 15:12:12 - 插入 / 更新.0 - 
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.core.row.value.ValueMetaBase.compare(ValueMetaBase.java:3832)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.lookupValues(InsertUpdate.java:138)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.processRow(InsertUpdate.java:299)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at java.lang.Thread.run(Thread.java:745)
2020/04/10 15:12:12 - 插入 / 更新.0 - Caused by: org.pentaho.di.core.exception.KettleValueException: 
2020/04/10 15:12:12 - 插入 / 更新.0 - birthdate_1_1 String(100) : couldn't convert string [1978/01/06 00::00:00.000] to a date using format [yyyy/MM/dd HH:mm:ss.SSS] on offset location 14
2020/04/10 15:12:12 - 插入 / 更新.0 - 1978/01/06 00::00:00.000
2020/04/10 15:12:12 - 插入 / 更新.0 - 
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.core.row.value.ValueMetaBase.convertStringToDate(ValueMetaBase.java:939)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.core.row.value.ValueMetaBase.getDate(ValueMetaBase.java:2302)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.core.row.value.ValueMetaBase.convertData(ValueMetaBase.java:3858)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.core.row.value.ValueMetaBase.compare(ValueMetaBase.java:3829)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	... 4 more
2020/04/10 15:12:12 - 插入 / 更新.0 - Caused by: java.text.ParseException: 1978/01/06 00::00:00.000
2020/04/10 15:12:12 - 插入 / 更新.0 - 	at org.pentaho.di.core.row.value.ValueMetaBase.convertStringToDate(ValueMetaBase.java:930)
2020/04/10 15:12:12 - 插入 / 更新.0 - 	... 7 more

然后疯狂在网上淘资料,始终没有找到一个解决办法,最后无意中看到了kettle自带的一个转换控件,抱着试一下的心态,竟然成功了,具体如下:
在这里插入图片描述

在这里插入图片描述

如果有小伙伴遇到类似的问题,可以尝试一下哦。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值