Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to compare one date with 5/1/2018 so I create two local variables and then use compareDate but it doesn't work - V2 can not be resolved as a variable.
Please advise me. Thank you!
V1: TalendDate.parseDate("MM/dd/yyyy",row1.ETD)
V2: TalendDate.parseDate("MM/dd/yyyy","05-01-2018")
Output: V1.compareDate(V2)>=0
Have a look to document for TalendDate routines.
https://help.talend.com/reader/_Qg2guINsDl6hsiB7uKWzQ/FbEV9SOAKgdqROp7dcKOQw
If you created variables in tMap then you have to refer variable with prefix Var.V1 or Var.V2.
Var.V1.compareDate(Var.V2)>=0
Regards,
Hi,
Thanks for your advise.
After I added Var. I still got error which showed "The method compareDate(Date) is undefined for the type date". I checked I changed data type to "Date" for variables
is it possible to provide screen shot of job and tMap configuration?
Regards,
Please see above
try this TalendDate.compareDate(Var.ETDate,Var.D0501)>=0
Regards,
After I run with "TalendDate.compareDate(Var.ETDate,Var.D0501)>=0" I got below error info -