-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: HQL Timestamp
PostPosted: Wed Apr 05, 2006 10:47 am 
Newbie

Joined: Wed Apr 05, 2006 10:42 am
Posts: 2
Hello all, it´s my first post.
I´m having problems with an HQL. I use PostgreSQL 8.1, and I need to make a select that returns every Timestamp field that has an hour, let´s say, afte 7:00. Tryed using to_date, but it doesn´t seem to work this way:

to_date('07:00','HH:mi')

anyone got any idea?

I want to verify the time of every date on a Timestamp field.

Thanks!

_________________
Rafael L. Andrade


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 05, 2006 12:36 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
have you tried
Code:
where hour(timestampfield) > 7
?

I've never used those time expressions, I'm just going off of what's in the docs:

http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#queryhql-expressions

_________________
nathan


Top
 Profile  
 
 Post subject: Didn´t work
PostPosted: Wed Apr 05, 2006 1:28 pm 
Newbie

Joined: Wed Apr 05, 2006 10:42 am
Posts: 2
ERROR: function hour(timestamp without time zone) does not exist

_________________
Rafael L. Andrade


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.