|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to use DataView class's RowFilter property to filter for DateTHi!
I use a DataTable with a string and a DateTime column as primary key. Now I want to wrap a DataView around that table and filter for a certain column. I want to use the RowFilter property. Something like this: DataTable myTable = new DataTable(); myTable.Columns.Add( "MyDate", typeof( DateTime ) ); DataView myView = new DataView( myTable ); myView.RowFilter = "MyDate = #12/31/2005 23:59:59#"; That datetime format string I used in the last line is wrong. Does anybody know the correct format string in form of "#MM/dd/yyyy HH:mm:ss#"? Best regards Marc |
|||||||||||||||||||||||