i have a coordinate system where the Y axis is UP. I need to convert it to a coordinate system where Z is UP. I have the rotations stored in quaternions, so my question is : if
No, you cannot exchange y and z -- it will turn into a Left-Handed Coordinate system, if it was Right-Handed (and vice-versa).
You can, however, do the following substitution:
newX = oldZ
newY = oldX
newZ = oldY
I suspect that what you really want is a simple rotation about the x axis. If that's why you want to switch y and z, then you should instead apply a rotation of -90 degrees about the +x axis (assuming you have a Right-Handed coordinate system).