How ignore Time in Between filter operation

24 views
Skip to first unread message

Felipe Oriani

unread,
Jun 4, 2020, 10:42:53 PM6/4/20
to nhu...@googlegroups.com
Hi everyone!

I have a project build with NHibernate and MySql. In this project I have query built using QueryOver and I would like to know how to ignore the time when I filter it using the "between" operator, for sample:

query  = query.AndRestrictionOn(x => x.FixDate).IsBetween(startDate).And(finishDate);

The problem is that I have a date and time value in FixDate property for sample: "05/05/2020 14:50:00", but the startDate and finishDate arguments I just have the date information like "05/05/2020 00:00:00". I want ignore the time on the FixDate on the between filter becuase sometimes it fails. How can I do this? 

I know I can add the time into the finishDate to be 23:59:59, but it sounds like a workaround to me which I want to avoid.

Thank you.


--
______________________________________
Felipe B Oriani
Reply all
Reply to author
Forward
0 new messages