
Contributor
2022-05-30
11:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MySQLのDATE型のカラムにTalendDate.parseDateの値を設定すると1日前の日付が設定される
MySQLのDATE型のカラムを作成
create table test3 (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
data_h date,
PRIMARY KEY (id)
)
ENGINE=InnoDB;
Talendのジョブから、tDBOutput にて
TalendDate.parseDate("yyyy-MM-dd","2022-05-30")
を登録すると、MySQL側には、"2022-05-29" が登録されます。
tLogRowで見る限り、Talend側からは、"2022-05-30" を渡しているように見えます。
尚、Talendジョブ側で、String型の"2022-05-30" として、実行すると
"2022-05-30" で登録できたので、実装は、String型で行っているので問題ありませんが
parseDateに問題があったのでしょうか?
494 Views
1 Reply

Anonymous
Not applicable
2022-06-16
08:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
This issue is usually caused by different timezone, go to check if the machine where studio is installed has the same timezone as the Mysql's server.
Regards
Shong
493 Views
