Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
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,
Subhadip