I think what you want for the first line is:
Code:
$collgrad = $post['field4'];
and you have an extra space in 'myrendervar ' lower down.
But I think maybe you just want to do this:
Code:
$collgradtruncated = substr($post['field4'], -2);
vB_Template::preRegister('postbit_legacy',array('collgradtruncated' => $collgradtruncated));
then in the template you can use {vb:raw collgradtruncated} for the two digit year.
You didn't say which hook location you're using.