Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RowFilter and Dates
Message
De
24/05/2004 09:33:42
 
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00906425
Message ID:
00906490
Vues:
14
John,

I haven't actually tried it, but have you tried it without the extra quotes? Either like this:
this.AnimalsVw.RowFilter = "Dob < " + DateTime.Today.AddMonths(-18);
or like this:
this.AnimalsVw.RowFilter = "Dob < " + DateTime.Today.AddMonths(-18).ToString();
~~Bonnie

>I am trying to set a filter on a dataview to show all animals over 18 months. Here is the code I have tried.
>
>
>this.AnimalsVw.RowFilter = "Dob < #" + DateTime.Today.AddMonths(-18) + "#" ;
>
>
>and I have also tried
>
>
>this.AnimalsVw.RowFilter = "Dob < '" + DateTime.Today.AddMonths(-18) + "'" ;
>
>
>Neither on the filters works either causing an error or just not filtering any animals.
>
>I am using C# and the compact framework.
>
>Thanks for any pointers.
>
>John
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform