trying to filter DataTable using DefaultView.rowFilter

  • Thread starter Thread starter hoadley
  • Start date Start date
H

hoadley

I am filtering a data table using the defaultView.rowFilter but when I
filter a column of type "dateTime"
it throws an exception saying " operator >= can not be used on type
dateTime and type double"

this is the code i'm using

dim startOfMonth as Date = new Date(now.year , now.month , 1)
the rowFilter text is "date >= " & startOfMonth
toShortString
 
Hoadley,

You can try this one
\\\
dv.RowFilter = "[date] >= '" & _
(New Date(Now.Year, Now.Month, 1).ToString & "'")
///

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top