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
or
03/05/2017
Depending on the output pattern which is defined outside the parseDate method.