I want to compare two fields with different data types:
- Integer data type (year – 4 digits)
- Date type ( data_inicio_tarv/date of initiation of ARV) – I have used a substr function in a hidden value to extract the year and convert it to integer as follows: int(substr(#form/dados_do_paciente/data_de_inicio_de_tarv, 0, 4)).
I want to compare the result of the hidden value, which is the extracted year (2) with the year entered in field 1, i.e, I compared if 1=2, but gives no result. What must be the problem?