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 by Miha

Miha
Wed Apr 23 12:41:49 CDT 2008

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/

"Ant" <Ant@discussions.microsoft.com> wrote in message
news:D5CFD66A-93F9-468D-A3D3-AA7E17AD2F53@microsoft.com...
> 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;
>