I have a variable with the following value
$month = 201002;
the first 4 numbers represent the year, and the last 2 numbers represent the m
Append "01" and strtotime will be able to parse the string :
echo date('M', strtotime($month . '01'));