I am using postgreSQL and trying to load a column from one table to another in the same db.
My source column is of VARCHAR type having date values. I am parsing this date and storing it in the target column as "yyyy-MM-dd" format in 'Date' datatype.
Problem: For some record the value is coming fine but for some records the date field is coming as one day before the actual date.
Conversion from string to date is as :
row5.seniority_date==null || row5.seniority_date.isEmpty() || row5.seniority_date.equals(" ")? null : TalendDate.parseDate("yyyy-MM-dd",TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",(row5.seniority_date))))
Please find attached screenshot for the same. Please help me to resolve this.
Hi @gervit14 ,
In that case can you please try TalendDate.parseDate("yyyy-MM-dd",row5.seniority_date.substring(0,10))
Thanks and Regards,
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables