1 person found this helpful
What error are you getting? Are you sure the string you are trying to convert only contains numeric characters? The method you are trying will work so long as the string is just a representation of a number
The value is 100 percent integer (2017). I have confirmed it by logging.
I even tried using this x = int('19') but getting an error.
Unfortunately i don't have python compiler at the moment. Getting just script fail error in log.
These are the classes i have added:
import java.sql as sql
import java.lang as lang
This works for me, no need to import java classes
fdmAPI.logDebug("Period Name=:%s" % fdmContext["PERIODNAME"]) fullYear = int("20" + fdmContext["PERIODNAME"][4:]) fdmAPI.logDebug("Full Year Name=:%s" % fullYear)
YearMinus1 = int("20" + fdmContext["PERIODNAME"][4:])-1 fdmAPI.logDebug("Year -1=:%s" % YearMinus1)
Thanks for help.