Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My job reads info from an Excel file where there's a date field (01/01/2021). When i define the input metadata i set "String" format to read this field. However, when i check my output i get this date: 01/01/21
Basically i want my output to return 01/01/2021 in string format. Can you explain me how can i get this?
Thank you!
Regards,
Enrique
You can convert date to String using talenddate.formatdate( yyyy-mm-dd talenddate.getcurrentdate())
hi, don't forget coma separator in the method formatdate and quote on the first arg :
TalendDate.formatDate("yyyy-MM-dd",TalendDate.getCurrentDate())
you can replace TalendDate.getCurrentDate() by the input row of your Excel date field.