all groups > dotnet ado.net > april 2008 >
You're in the

dotnet ado.net

group:

LINQ with Datetime



LINQ with Datetime Ant
4/23/2008 2:27:01 AM
dotnet ado.net: Hi,
How can I use a date string to test a date in a LINQ query.
Below is a query in Northwind

Many thanks for any help

Ant

NorthwindDataContext db = new NorthwindDataContext();

var resultSet = from o in db.Orders
where o.OrderDate >= Convert.ToDateTime("20080601")
select o;
Re: LINQ with Datetime Miha Markic
4/23/2008 7:41:49 PM
Not sure what are you asking for....
Can you provide some more details?
What's wrong with your code (except for the fact that you should use new
DateTime(2008, 6, 1) instead)

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

[quoted text, click to view]
AddThis Social Bookmark Button