Extracting only z rotation matrix from a rotation matrix

I have a 3X3 rotation matrix. I have small 3D model. I only need to consider z rotation for that model, I don’t need to consider xy movement or rotation. How can I extract the matrix that only consider z rotation of the model from the given rotation matrix?
Thanks every body in advance.

I remember I had this problem quite some time ago, it’s not trivial task, here is some info


(scroll down to Euler angles section, there is link to pdf ‘Extraction of Euler angles from rotation matrix’ there, it’s messy, but explains necessary math)