Four Stars

How to convert string to date


How to convert string whose value is "29-JUN-2018" (including double parenthesis in its value) to date format? 
The expected format is "yyyy-MM-dd'T'hh:mm:ss.SSS"

2 REPLIES
Ten Stars

Re: How to convert string to date

first tmap split your string in 3 parts
second Tmap change Jun to 06
third Tmap convert 20180629 to dat then format this Date
TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("yyyyMMdd", 20180629 ))

Francois Denis

Don't forget to tag when it's "solved"!

Six Stars

Re: How to convert string to date

mapping.PNGparse.PNGtmap.PNGout.PNG