Working with dates and LINQ to SQL

Something I’ve heard developers complain about on numerous occasion is that DateTime comparisons between SQL and .NET is a real pain. Often you need to do a comparison of the date against either a Min or Max value.
With raw .NET this is really qu…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

Something I’ve heard developers complain about on numerous occasion is that DateTime comparisons between SQL and .NET is a real pain. Often you need to do a comparison of the date against either a Min or Max value. With raw .NET this is really quite easy, you can just use the DateTime struct and grab DateTime.MinValue or DateTime.MaxValue. But if you’ve ever done this: var res = from item in Collection where item.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate
APA
Posts on LINQ to Fail | Sciencx (2022-09-26T10:16:29+00:00) » Working with dates and LINQ to SQL. Retrieved from https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/.
MLA
" » Working with dates and LINQ to SQL." Posts on LINQ to Fail | Sciencx - Sunday April 25, 2010, https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/
HARVARD
Posts on LINQ to Fail | Sciencx Sunday April 25, 2010 » Working with dates and LINQ to SQL., viewed 2022-09-26T10:16:29+00:00,<https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Working with dates and LINQ to SQL. [Internet]. [Accessed 2022-09-26T10:16:29+00:00]. Available from: https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/
CHICAGO
" » Working with dates and LINQ to SQL." Posts on LINQ to Fail | Sciencx - Accessed 2022-09-26T10:16:29+00:00. https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/
IEEE
" » Working with dates and LINQ to SQL." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/. [Accessed: 2022-09-26T10:16:29+00:00]
rf:citation
» Working with dates and LINQ to SQL | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2010/04/25/working-with-dates-and-linq-to-sql/ | 2022-09-26T10:16:29+00:00
https://github.com/addpipe/simple-recorderjs-demo