Date Conversion 05-JUN-2017 into 05-06-2018

Seven Stars

Date Conversion 05-JUN-2017 into 05-06-2018

How to convert String 05-JUN-2017 into date 05-06-2017 in tMap?


Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: Date Conversion 05-JUN-2017 into 05-06-2018

TalendDate.formatDate("dd-MM-yyyy", TalendDate.parseDateLocale("dd-MMM-yyyy", "05-JUN-2017", "EN"))

TRF
Forteen Stars TRF
Forteen Stars

Re: Date Conversion 05-JUN-2017 into 05-06-2018

05JUN2017 doesn't match with the format of your initial post...

Change to

TalendDate.formatDate("dd-MM-yyyy", TalendDate.parseDateLocale("ddMMMyyyy", "05JUN2017", "EN"))

TRF

All Replies
Forteen Stars TRF
Forteen Stars

Re: Date Conversion 05-JUN-2017 into 05-06-2018

TalendDate.formatDate("dd-MM-yyyy", TalendDate.parseDateLocale("dd-MMM-yyyy", "05-JUN-2017", "EN"))

TRF
Seven Stars

Re: Date Conversion 05-JUN-2017 into 05-06-2018

When i convert the error has been occured

 

String 05JUN2017 is unparsable Date @TRF

Forteen Stars TRF
Forteen Stars

Re: Date Conversion 05-JUN-2017 into 05-06-2018

05JUN2017 doesn't match with the format of your initial post...

Change to

TalendDate.formatDate("dd-MM-yyyy", TalendDate.parseDateLocale("ddMMMyyyy", "05JUN2017", "EN"))

TRF