Five Stars

Insert SCV Have dd/MM/yyyy to tMap the outpout dd/MM/yyyy 00:00:00.000


I Have a csv contain a date like this 13/06/1967 I want to insert it to the sql server but the problem it inserted like this 1967-06-13 00:00:00.000 in DB
I used this sentence in tMap

ToMap.date.equals("00/00/00") ? null : TalendDate.parseDateLocale("dd/MM/yyyy",ToMap.date ,"EN")

and I made the output tyoe of tMap date like this  "dd/MM/yyyy" 
I want it still 13/06/1967

8.JPG

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Ten Stars

Re: Insert SCV Have dd/MM/yyyy to tMap the outpout dd/MM/yyyy 00:00:00.000

it may be not a Talend problem, it SQL Server add 00:00:00.000 if Your column datetime

 

example below - result of same SQL insert (without talend) into 3 different date type columns

same value - 2017-05-10

 

Screen Shot 2017-05-11 at 12.13.16 AM.png

-----------
1 REPLY
Ten Stars

Re: Insert SCV Have dd/MM/yyyy to tMap the outpout dd/MM/yyyy 00:00:00.000

it may be not a Talend problem, it SQL Server add 00:00:00.000 if Your column datetime

 

example below - result of same SQL insert (without talend) into 3 different date type columns

same value - 2017-05-10

 

Screen Shot 2017-05-11 at 12.13.16 AM.png

-----------