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

View solution in original post

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

View solution in original post


All Replies
Sixteen Stars TRF
Sixteen 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

View solution in original post

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

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

View solution in original post

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 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog