Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a bunch of dates coming in from a MySQL database, most are "0000-00-00", but if I use TalendDate.formatDate() to print them out, talend thinks they are "0002-12-31". Not only that, but if I try to check the formatted date string with a hard-coded string, they do not match.
System.out.println((row1.photocardexpiry == null ? "no" :
TalendDate.formatDate("yyyy-MM-dd",row1.photocardexpiry) +
(TalendDate.formatDate("yyyy-MM-dd",row1.photocardexpiry) == "0002-12-31" ? "YES!" : "")));
The results from this end up being along the lines of:
no
0002-12-31
0002-12-31
no
no
no
no
0002-12-31
When "0002-12-31" crops up, there should be a "YES!" after it, but there never is. For some reason it won't match the strings?