how to filter data based on dates?

Highlighted
Six Stars

how to filter data based on dates?

I want to filter invoice data based on invoice date greater than 1 Jan 18. 

 

how can i implement this using tfilter?  do i need to use advanced mode ?

Tags (1)

Accepted Solutions
Six Stars

Re: how to filter data based on dates?

Hi Pankaj,

 

In advanced mode, try this :

input_row.date.after( TalendDate.parseDate("yyyy-MM-dd","2018-01-01"))

 

What you put in the parseDate depends of the format of your date. Here i'ts an example.


All Replies
Six Stars

Re: how to filter data based on dates?

Hi Pankaj,

 

In advanced mode, try this :

input_row.date.after( TalendDate.parseDate("yyyy-MM-dd","2018-01-01"))

 

What you put in the parseDate depends of the format of your date. Here i'ts an example.

Twelve Stars

Re: how to filter data based on dates?

you may use something like that:
TalendDate.diffDate(Date1(), Date2(), "dd")>0

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Six Stars

Re: how to filter data based on dates?

I have some date in which we have invoice date null, So how can I NVL that?

Say if invoice date is null then I want to check invoice_Sent_Date after 1 jan 18
Twelve Stars

Re: how to filter data based on dates?

(yourdate==null)?ifyes:ifnot
it's an inlin if in java. you can use it on tmap

Francois Denis

Tag as "solved" for others! Kudos to thanks!

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 2

Part 2 of a series on Context Variables

Blog

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