Six Stars

Type mismatch: cannot convert from Object&Serializable&Comparable<?> to Date

Hello Experts,

 

I am trying to write an expression in tmap but that is throwing an error : Type mismatch: cannot convert from Object&Serializable&Comparable<?> to Date

 

Expression: 

 

FileConsents.Status == "Opt-out" ? FileConsents.TRANSACTION_DATE : "" 

 

the field in output is a date field.

 

please help

 

A

  • Talend Integration Cloud
1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars TRF
Eleven Stars

Re: Type mismatch: cannot convert from Object&Serializable&Comparable<?> to Date

Not sure this is enough, but did you try:
"Opt-out".equalsIgnoreCase(FileConsents.Status) ? FileConsents.TRANSACTION_DATE : null
(because you cannot move a empty string to a date field)

TRF
1 REPLY
Eleven Stars TRF
Eleven Stars

Re: Type mismatch: cannot convert from Object&Serializable&Comparable<?> to Date

Not sure this is enough, but did you try:
"Opt-out".equalsIgnoreCase(FileConsents.Status) ? FileConsents.TRANSACTION_DATE : null
(because you cannot move a empty string to a date field)

TRF