File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Object Relational Mapping
How to write to TO_CHAR and TO_DATE in HQL
Joined: Jul 17, 2008
Feb 17, 2009 22:21:09
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;
Joined: Apr 14, 2004
Feb 18, 2009 01:59:49
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?
I agree. Here's the link:
subject: How to write to TO_CHAR and TO_DATE in HQL
How to insert DateTime with HQL
java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric
Convert to timestamp yyyy-MM-dd hh:mm:ss a
String to Date Convertion in HQL
Order by clause
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014