Constante caractère non valide

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Constante caractère non valide



I'm trying to do this:


ope_tFilterRow_4.matches((row7.Subscription == null? false :
row7.Subscription.compareTo('01-01-2014') > 0)
, "Subscription.compareTo('01-01-2014') > 0 failed");



And it said that:



constante caractère non-valide error ( = Invalid character constant)!



In my table I have this same format of date and I have also tried to parse it and got the same error.




1 Answer
1



Replace


row7.Subscription.compareTo('01-01-2014')



with


row7.Subscription.compareTo("01-01-2014")



EDIT :



I suppose that row7.Subscription is a date. Here is how to compare dates with Talend :


row7.Subscription


TalendDate.parseDate("dd-MM-yyyy","01-01-2014").compareTo(row7.Subscription)





i have donne it and it gives me that can't compare date with string
– ARAZI
May 13 '16 at 10:20





the same with no ' or " can't compare date type with int
– ARAZI
May 13 '16 at 10:24






I edited the answer to show how to convert string to dates in Talend. As you seem to be french, here is a link which explains it in french : developpez.net/forums/d850781/logiciels/solutions-d-entreprise/…
– Arnaud Denoyelle
May 13 '16 at 10:26





I believe you're correct. The main issues appear to be that Java strings always need to be enclosed in double quotes and that comparison needs to be with compatible data types.
– dbh
May 13 '16 at 17:14






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS