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.  [ 1 post ] 
Author Message
 Post subject: How can I do a Query with criteria about hour
PostPosted: Fri Nov 03, 2006 4:49 am 
Newbie

Joined: Tue Jul 25, 2006 2:50 am
Posts: 11
Hello!!
I`m doing a query with a object that contains a field of the type DateTime. And I´d like to do a query using criteria filtering for the hour of de datetime. Is that possible??
Anybody help me?


My criteria is like this:


IList lista = null;
ISession session = null;
session = Configuracion.Factory.OpenSession();
ICriteria crit = session.CreateCriteria(typeof(TYPE));
if (Hora != DateTime.MinValue)
{
crit.Add(Expression.Eq("Hora", Hora));
}
lista = crit.List<Ronda>();



Thank's


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

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.