
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Talend JTDS Driver cannot insert datetime2
Hi all,
I have SQL Server input and output components with some DATETIME2 columntable, there is data like `0077-07-07 00:00:00`
maybe because previous worker didn't validate the datetime so the data turned out like thatAnd then I tried to send the data to destination using JTDS driver, when I ran the Talend Job, error message came with text '
Conversion failed when converting date and/or time from character string.'. On advance setting in output I check the option 'Ignore date out of range'.I wonder, how to pass that data using JTDS Driver? because I want to use JTDS Driver if possible.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd give a try and set it up as String and convert the Date to String via yyyy-MM-dd pattern then hopefully this will reach the database as a String and the database auto-convert it via an ISO pattern.
From the error message I'd also double check if this happens in the input or the output component.
Theoretically the Date type should work fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you also share what is the columns schema type in Talend, is it String or Date?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
its Date type with DATETIME2 for db type. you can see image below

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your content helped me a lot to take my doubts, thank you very much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd give a try and set it up as String and convert the Date to String via yyyy-MM-dd pattern then hopefully this will reach the database as a String and the database auto-convert it via an ISO pattern.
From the error message I'd also double check if this happens in the input or the output component.
Theoretically the Date type should work fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so the output schema is String? or still datetime2? because I want the scheme to be as datetime2 as possible.
