If the variable you are storing your months is DateTime variable, then its really simple because all you have to do is convert it to string and set the parameters in the string to achieve your preferred format:
fromDate.toString("MM");
fromDate.toString("MMMM");