You want to change the string value of a certain variable (let's say Month) by another string value ?
Since you use date you could check if there is any function which could help you here:
[http://pig.apache.org/docs/r0.11.1/func.html#datetime-functions][1]
Or You can code your UDF fonction
Or you can do it with something like this :
res = foreach Data { NewMonth = (Month matches 'January'? '1' : (Month matches 'February'? '2':(...) ) ) Generate ...,NewMonth AS Month, ... ; };
But it's not very beautiful, I truly recommend you to write a UDF fonction and then just call it :
res = foreach Data Generate ...,ChangeMonth(Month) AS Month,...;