This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Neither SQL Server nor HQL support TO_CHAR. What is it you are trying to achieve? If it is just formatting a date why not just do this using a DateFormat?