DataView.RowFilter an ISO8601
Posted
by Ryan
on Stack Overflow
See other posts from Stack Overflow
or by Ryan
Published on 2010-01-16T03:49:56Z
Indexed on
2010/05/05
2:08 UTC
Read the original article
Hit count: 321
I have a DataTable (instance named: TimeTable) whose DefaultView (instance named: TimeTableView) I am trying to use to filter based on a date. Column clock_in contains an ISO8601 formatted string. I would like to select all the rows in this DataTable/DefaultView between 2009-10-08T08:22:02Z and 2009-10-08T20:22:02Z.
What would I have to filter on this criteria? I tried:
TimeTableView = TimeTable.DefaultView;
TimeTableView.RowFilter = "clock_in >= #2009-10-08T08:22:02Z# and #2009-10-08T20:22:02Z#";
This is not working for me. Am I operating on the wrong object or is my filter syntax wrong?
© Stack Overflow or respective owner