Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to write to TO_CHAR and TO_DATE in HQL  RSS feed

 
Maya Pillai
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How to write to TO_CHAR and TO_DATE in HQL (DB is MS SQL Server)

I would like to translate this query.

SELECT TO_CHAR(EMPJOINDATE,'MM/DD/YYYY HH:MI:SS') FROM EMP;

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!