if it doesnt have to be code you could do this with the LEFT or MID functions..depending where the '22' was located.
if the 6 digit number is inside a string, then you'd need to use MID. if the 6 digit number is only 6 characters long, and you're only wanting the ones that start with '22', you could use the LEFT function (nested with IF).