Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
EnriqueLDE
Contributor II
Contributor II

Read Date in String format

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

Labels (2)
3 Replies
Banupriya
Contributor III
Contributor III

You can convert date to String using talenddate.formatdate( yyyy-mm-dd talenddate.getcurrentdate())

gjeremy1617088143

hi, don't forget coma separator in the method formatdate and quote on the first arg :

 

TalendDate.formatDate("yyyy-MM-dd",TalendDate.getCurrentDate())

gjeremy1617088143

you can replace TalendDate.getCurrentDate() by the input row of your Excel date field.