Problem with Date import into MySQL (date imported with wrong year)

Highlighted
Five Stars

Problem with Date import into MySQL (date imported with wrong year)

Hi all,  

I am trying to import .txt file into MySQL database, and all columns are being imported but I am having an issue with the date where the year is showing 0015 or 0016 instead of 2015 or 2016.

The date column in the .txt file

27-Jul-15
27-Jul-15
27-Jul-15
27-Jul-15
20-Oct-15
25-May-15
25-May-15
25-May-15
25-May-15

 

What is being imported into the database:

0015-07-27
0015-07-27
0015-07-27
0015-07-27
0015-07-27
0015-07-27
0015-07-27
0015-10-20
0015-05-25
0015-05-25

 

I tried ParseDate, FormatDate and even without expression but doesn't seem to solve it.

What am I doing wrong ?


Accepted Solutions
Five Stars

Re: Problem with Date import into MySQL (date imported with wrong year)

Found the issue... so simple !

the txt had the date as dd-MMM-yy while i was using dd-MMM-yyyy

cheers


All Replies
Employee

Re: Problem with Date import into MySQL (date imported with wrong year)

Hi,

 

Could you be a little more precise?

Like which product are you using? Which version?

If it's Studio, capture (at least) of your job?

 

Thx

Five Stars

Re: Problem with Date import into MySQL (date imported with wrong year)

Hi smallet, 
Thanks for quick reply!

I am using Talend Open Studio for Data Integration Version: 6.4

And this is the job i am doing:

1.JPG

 

 

 

 

 

 

 

Employee

Re: Problem with Date import into MySQL (date imported with wrong year)

So, you're using the Studio, that's good to know.

Could add more information, like the original file, the job?

Five Stars

Re: Problem with Date import into MySQL (date imported with wrong year)

the original file is a .txt and Date column as "dd-MMM-yyyy" as I added also as Metadata delimited file.

And Tmap as follows without any expression:

 

1.JPG

It is importing month and day correctly but the year is starting with 00 instead of 20 (0016 instead of 2016)

 

 

 

Five Stars

Re: Problem with Date import into MySQL (date imported with wrong year)

Found the issue... so simple !

the txt had the date as dd-MMM-yy while i was using dd-MMM-yyyy

cheers

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Introduction to Talend Open Studio for Data Quality

Find out about Talend Open Studio for Data Quality

Watch Now

Enabling Data Governance

Learn how to enable Data Governance

Watch Now

The Definitive Guide to Government Data Quality

Take a peek at the definitive guide to Government Data Quality

Read