Filtering data using a date field (from SalesForce) = today date

One Star

Filtering data using a date field (from SalesForce) = today date

Hello,
I'm a beginner in Talend...
What i want to do is simple, i want to make a filter based on a date field (LastModifiedDate) from SalesForce...
My selection will only contain records which where modified today... 
In tmap i added this filter :
TalendDate.getDate("YYYY-mm-dd")=TalendDate.formatDate("yyyy-MM-dd",row1.LastModifiedDate)
And each time i try i got : "the left side of an assignment must be a variable"...
I do really have a problem with syntax... can you help me ?
My whish, something simple Smiley Happy
Community Manager

Re: Filtering data using a date field (from SalesForce) = today date

Hi 
Try this expression:
TalendDate.getDate("YYYY-mm-dd").equals(TalendDate.formatDate("yyyy-MM-dd",row1.LastModifiedDate))
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Filtering data using a date field (from SalesForce) = today date

Yes this seems great... thanks a lot...
Now my problem is : the processe will read all the rows of the source table... and will not let anything goint thrue tmap (date formating problem ??)
Maybe it would be better to put the equivalent in the query condition directly in the tSalesforceInput... but the syntax is one more time different ...
Would you help me again ? Smiley Happy
I already do a lot of thing with Talend, it's an incredible soft, love it Smiley Wink
One Star

Re: Filtering data using a date field (from SalesForce) = today date

If i put in query condition :
"SkuUpdDate__c='2016-02-04'" it works perfectly...
what should i put instead of '2016-02-04' to get today's date ? something like get date ect....
Thanks in advance
One Star

Re: Filtering data using a date field (from SalesForce) = today date

I found the main problem : the Lastmodified date is stored like this (in SalesForce) :"yyyy-MM-dd'T'HH:mm:ss'.000Z'"
What conversion shall i do to this field to get : mm-dd-yyyy ... would be perfect... as a string maybe ?
Same question for getdate() to get todays date... as a string too ?... (same type the last modified date) to be able to compare the two.