Wednesday 13 March 2013

RowFilter of a DataView



It is something that I worked on for 6 hours, and finally I found a way to get it works.

Here is the way to get all row that has a field between two dates :

String.Format("DATE >= #{0}# AND DATE REQUIS < #{1}#", CDate(txtDebut.Text).ToShortDateString(), CDate(txtFin.Text).AddDays(1).ToShortDateString())

Don't forget that you should not try that with a Date that is converted in a string, it won't work.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home