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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now