Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello to all,
I would like to compare the dates to a pattern to understand which month those dates belong to.
for example I want to compare 04-04-2020 with dd-11-yyyy to understand if the date is in November.
my idea was to use it in tMap:
row1.birth_date.equals (dd-11-yyyy)? "ok": "not november"
but it doesn't work, do you have any ideas?
Hi
The function equals () is used to check if the two strings are equal. If you want to get part of a date, use this function. TalendDate.getPartOfDate(String partName, Date date),for example:
TalendDate.getPartOfDate("MONTH", row1.dateColumnName)+1==11?"ok": "not november"
Regards
Shong
Hi
The function equals () is used to check if the two strings are equal. If you want to get part of a date, use this function. TalendDate.getPartOfDate(String partName, Date date),for example:
TalendDate.getPartOfDate("MONTH", row1.dateColumnName)+1==11?"ok": "not november"
Regards
Shong
thank you so much! 😀