I am trying to get data from database for a specifc date but the date is stored containing time also.
C#
var dataAzi = DateTime.Now.ToShortDateString();
MemList = await _context.MemoratClassDetails.Include(s => s.MemoratClassSubCategory)
.ThenInclude(s => s.MemoratClassCategory)
.Where(s => s.MemDataReminder.ToShortDateString() == dataAzi)
.ToListAsync();How can I select data using only date but no time? Curent query gives error


Marius VasileRank #785 · 2.9K reputationPosted Oct 9, 2022, 4:59 AM EDT
Fixed, I used
and is working