Business Rule for Dates

Five Stars

Business Rule for Dates

Hello,

 

I'm trying to establish a business rule for a date that I've introduced with string format. I want the output to be a Date with the next format: dd/MM/yyy, and the null values to remain null. I've tried this one that doesn't work:

 

TalendDate.isDate(row1.Fecha_de_Llegada_Real,"EEE MMM dd HH:mm:ss zzzz yyyy") ? TalendDate.parseDate("dd/MM/yyyy",row1.Fecha_de_Llegada_Real) : null

 

Could anyone help me?

 

Thank you!!

Marc

 

 

Sixteen Stars TRF
Sixteen Stars

Re: Business Rule for Dates

To be sure, give an example of the input date you want to convert

TRF
Five Stars

Re: Business Rule for Dates

Here's the input format:

 

2019-09-19 16_15_41-DOC_TRANSP.XLSX - Excel.png

 

But when we define it as a string in TOS, It changes to another format.

 

Thank you

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 3

Read about some useful Context Variable ideas

Blog