Предполагая, что SQL Server и T-SQL, этот ICriteria сделает это.
IList results = Session.CreateCriteria(typeof(Record), "record")
.SetProjection(Projections.ProjectionList()
.Add(Projections.SqlGroupProjection("CONVERT(date, {alias}.[IssueDatetime]) AS [DateVal]", "CONVERT(date, {alias}.[IssueDatetime])", new[] { "DateVal" }, new IType[] { NHibernateUtil.Date }))
.Add(Projections.Sum("Tax"), "TotalFare"))
.List();
Сгенерирован следующий SQL.
SELECT CONVERT(date, this_.[IssueDatetime]) AS [DateVal], sum(this_.Tax) as y1_ FROM IgnoreTime_Record this_ GROUP BY CONVERT(date, this_.[IssueDatetime])