Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering on a date literal
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Filtering on a date literal
Divers
Thread ID:
01554501
Message ID:
01554501
Vues:
45
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform