Im ILERPG gehts mit %CHAR auch ohne SQL.

%replace(%char(MyTimeStamp:*iso):' ':'T') + 'Z';