Hi, I have a regular expression that extracts the Year from a month_year i.e. "August_2020". However, I haven't been able to find the correct syntax to convert the character Year "cYear" to number so I can do math with it. I will appreciate any pointers. Thanks!!
Names Default To Here( 1 );
SelMonth = {"October_2020"};
cYear = (Regex Match (char(SelMonth), "\d{4}") );
//convert character year to number year
nYear = Num ("cYear"); //Scripting Guide p137
//Subtract 1 and get previous year
pYear = (nYear - 1);
//convert previous year to character
cpYear = Char ( pYear);