Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
 
 
Labels (1)
  • v7.x

1 Reply
Anonymous
Not applicable
Author

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 🙂