Date with RowFilter

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi,

I have a little problem with the Dataview Rowfilter.
I use the following syntax to filter my datas

VueMarge.RowFilter="idbonf<>0 and dcdef>=#" & tDate1.value.ToUniversalTime &
"# and dcdef<=#" &
tDate2.value.ToUniversalTime & "#"

But it doesn't work. I can't retreive any datas from my dataview.
If I remove the filter it works.

The datas from my tables are saved like that : 02/12/2003 01:53:00
tData1 and tDate2 are from DataTimePicker using a custom format (dd/MM/yy)

Do I miss something ?

Stan
 
Hi Stan,

What is the output string of ToUniversalTime for your computer?
It has to be in the english format (as you noted below).
What is the datatype of DataColumn dcdef?
 
Hi Miha,

About the DataColumn I use

..Columns.Add("dcdef", GetType(Date))

When I make a console.Writeline of "idbonf<>0 and dcdef>=#" &
tDate1.value.ToUniversalTime......
I get dcdef>=#08/11/2003 05:21:43# ....

I list the datarowview and this the output
03/12/2003 05:05:00
03/12/2003 05:24:00

Stan
 
Back
Top