The easiest way that comes to mind would be to map a read-only
property to a sql conversion Convert('dd', OrderDate)

<property name="OrderDay" formula="Convert('dd', OrderDate)" type="Int"/>

The Convert('dd' OrderDate) might vary depending on your backing db.

You could then reference OrderDay in your criteria queries.

On Tue, Oct 28, 2008 at 3:40 PM, Mauro <[EMAIL PROTECTED]> wrote:
>
> HI
> I have a question for you monster of nhibernate ;-)
>
> I try to make a quey with HQL dialects where I have group by date.
> I try to explain better:
> I have a field.. let call it: OrderDate in Order class in this field
> is stored the date in format like "28/10/2008 15:51:15"
> How can retrive and group only by DAYS ?
> as result's example will be like this :
> (sum) (day)
> 5 27
> 13 28
> 10 29
> 11 30
> 9 31
> 10 1
> etc..
>
> Is it possible ?
>
> thanks
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to