Date Format

Highlighted
Six Stars

Date Format

Hi.

 

I have a problem with date format, because data has differents kinds of format in columns where data is date, formats are:

 

28/02/2019

3/Mar/2019

31-01-19

20-Feb-2019

Wed Mar 23 14:56 2019

And any format that you can imagine.

 

So, I need to the format will be English format "20-02-2019" in one, in other I need format "12-07-2019 14:35", I have the next definition:

 

StringHandling.LEN(row1.PO_Creation_Date)>0 ? (TalendDate.parseDateLocale(StringHandling.LEN(row1.PO_Creation_Date)>18 ? "EEE MMM dd HH:mm:ss zzz yyyy" : "dd-MMM-yy",row1.PO_Creation_Date,"EN")) : null
 
AND
 
StringHandling.LEN(row18.Fecha_de_confirmacion_de_carga_a_transporte)>0 ? (TalendDate.parseDateLocale(StringHandling.LEN(row18.Fecha_de_confirmacion_de_carga_a_transporte)>18 ? "EEE MMM dd HH:mm:ss zzz yyyy" : StringHandling.LEN(row18.Fecha_de_confirmacion_de_carga_a_transporte)>= 8 ? "dd-MMM-yyyy" : "dd/MM/yy",row18.Fecha_de_confirmacion_de_carga_a_transporte,"EN")): null
 
Can you explain me?
 
Regards.
 
 
Employee

Re: Date Format

Hi,

 

     If my understanding about your query is correct, you are expecting the incoming date to be in any format and you would like to convert them to a standardized output format.

 

    If you are using Talend Studio, it expects the incoming date in a specific format else you will have to write a marathon list of all possible combinations to convert the date to a standardized format.

 

    But there is an easy solution if you are using subscription version of Talend where you can use Talend Data Preparation to do the cleansing activity. You can create a rule in the Talend Data Preparation recipe where you want to standardize the incoming date. This recipe will be called from Studio to perform the cleansing and you will get standard date in the output.

 

    Please refer the below link for the details.

 

https://help.talend.com/reader/JhYq1xxY0SNSBZCbOFzZGg/Ilfz1haQrh_USmE7BkJFsA

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog