Home Compare dates linq c#
Reply: 0

Compare dates linq c#

user848 Published in June 22, 2018, 11:33 am

This question already has an answer here:

  • How to compare only date components from DateTime in EF? 15 answers

I cant seem to get my query to check the database if a date exists. Please help.

 DateTime value = new DateTime(2018, 10, 26);
 item = await table.Where(todoItem => todoItem.Date == value.date)

I think the format which c# writes their dates and SQL are different so it cant find a match. Also the database is correctly linked to the app as I am able to query other rows in the same table.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.330946 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO