Groups | Blog | Home
all groups > dotnet faqs > april 2005 >

dotnet faqs : RowFilter on Date field


Manoj Paramu Das
4/20/2005 12:56:13 PM


I have loaded an xml file to a dataset and one of the fields being
"UserDate" and has date values like
<UserDate>2005-01-01T00:00:00.0000000-05:00</UserDate>
I am trying to apply a row filter to this field and it doesn't seem to work

dvCMonth.RowFilter = "Month(UserDate)=" & Now().Month

dvCMonth.RowFilter = "Month(UserDate)='4'"

no matter what I try, it doesn't work however, Any help would be appreciated
and thanks in advance.


Manoj Das

sachintana
4/21/2005 12:00:00 AM
Please verify that the column data type is Date in the UserDate column in
the DataSet.
UserData.DataType = Type.GetType("DateTime");

OR,

If you have assigned a XSL to the particular XML file, set the data type to
the UserData element in the XSL schema.


Best regards,
sachintana-MCSD.NET


[quoted text, click to view]
AddThis Social Bookmark Button