Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering on a date literal
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Filtering on a date literal
Miscellaneous
Thread ID:
01554501
Message ID:
01554501
Views:
46
Hi all:

I have the following query, and I'm having trouble filtering on a specific date (12/31/7777). The commented lines are a couple of things I've tried, among others. What is the correct syntax for this? Amazing I don't see this anywhere with a google search.

var employees = context.EmpDatas
.Where((e) => e.EmpID == 648476);
// .Where((e) => e.EmpID == 648476 && e.ExpDate.ToString == "7777-12-31")
// .Where((e) => e.EmpID == 648476 && e.ExpDate.ToString == new DateTime(7777, 12, 31))

Thanks...
Del
Next
Reply
Map
View

Click here to load this message in the networking platform