CONVERT function is similar to CAST function and they should in general have the same behavior. This issue addresses the implementation for CONVERT (which should re-use the code for CAST) and, also, double checks the CAST solution so far.
This is part of #30007.