Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if(Integer.parseInt(input_row.CISR_VER) == 0)
{
output_row.CISR_VER = "";
}
else
{
Integer year = Integer.parseInt(input_row.CISR_VER.substring(0, 2));
year += 1980;
output_row.CISR_VER = input_row.CISR_VER.substring(2, 4) + "/" + year.toString();
}
Hi Andrew,
Use a tJavaRow to take your incoming data flow and use the following:if(Integer.parseInt(input_row.CISR_VER) == 0)
{
output_row.CISR_VER = "";
}
else
{
Integer year = Integer.parseInt(input_row.CISR_VER.substring(0, 2));
year += 1980;
output_row.CISR_VER = input_row.CISR_VER.substring(2, 4) + "/" + year.toString();
}
Note that you could do this inline within a tMap expression, but I've expanded it for clarity here.
Cheers,
c0utta
Yes but you can use the java statement to do it, just put that in the Expression of your output column :
Integer.parseInt(row1.CISR_VER) == 0?""row1.CISR_VER.substring(2,4) + "/" + ((Integer)(Integer.parseInt(row1.CISR_VER.substring(0, 2)) + 1980)).toString())
It's a little bit more tricky I agree 🙂