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
Fifteen Stars TRF
Fifteen 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
Fifteen Stars TRF
Fifteen 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
Fifteen Stars TRF
Fifteen 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

Fifteen Stars TRF
Fifteen 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

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads