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!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Test drive Talend's enterprise products.