You might want to add an auxiliary property to your map using the Formula command to be able to use the date (instead of date and time) in your queries.
here is an example from my code; it uses a decimal value, but this works fine with any subquery:
the model class has this property, which must be mapped to the formula:
public virtual decimal Profit { get { return this.SellPrice - this.Cost; } set { return; } }
fluentNHibernate map:
//SellPrice and Cost are columns in the object table Map(v => v.Profit).Formula("(SellPrice - Cost)"); // this field is calculated, not read
be sure to put the formula between the brackets ().
If you make a select formula that associates date and time with a date, you can group this property in your query.
source share