talend Using Date in Talend Parsing a date


Parsing date is used when having an input typed as String and when it is needed to get it as a Date. The class TalendDate contains method TalendDate.parseDate("pattern","stringDate").

Pattern here is the input pattern, and not the expected output pattern.

Usage : For an input string like "2017-05-03 17:09:00" , the call will be :

TalendDate.parseDate("yyyy-MM-dd HH:mm:ss","2017-05-03 17:09:00")

The result could be a date like :

2017-05-03 17:09:00 



Depending on the output pattern which is defined outside the parseDate method.

Define date pattern in the output settings of the schema