I'm trying to set the RowFilter = "MyDateTimeColumn in ('2005-02-21')" but
it returns 0 rows. I know the row is there. If change the RowFilter to
RowFilter = "MyDateTimeColumn not in (all the other dates but 2005-02-21) it
returns the rows.

Any suggestions?

Re: DataView.RowFilter and DateTime column by Joe

Joe
Thu Apr 28 12:44:07 CDT 2005

BTW - I also tried enclosing the date in # like so - MyDateTimeColumn in
(#2005-02-21#)

"Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
news:#903vVBTFHA.2336@TK2MSFTNGP12.phx.gbl...
> I'm trying to set the RowFilter = "MyDateTimeColumn in ('2005-02-21')" but
> it returns 0 rows. I know the row is there. If change the RowFilter to
> RowFilter = "MyDateTimeColumn not in (all the other dates but 2005-02-21)
it
> returns the rows.
>
> Any suggestions?
>
>



Re: DataView.RowFilter and DateTime column by Joe

Joe
Thu Apr 28 14:16:33 CDT 2005

more info. It turns out that when using not in all records are returned.

If I do MyDateTimeColumn > #2/28/2005# than all rows with a date equal or
greater is returned.

It seems RowFilter really doesn't handle Dates too well.

I also checked to make sure there is no time with the date in the table and
there isn't. I display the DataView in a DataGrid for testing.

"Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
news:#903vVBTFHA.2336@TK2MSFTNGP12.phx.gbl...
> I'm trying to set the RowFilter = "MyDateTimeColumn in ('2005-02-21')" but
> it returns 0 rows. I know the row is there. If change the RowFilter to
> RowFilter = "MyDateTimeColumn not in (all the other dates but 2005-02-21)
it
> returns the rows.
>
> Any suggestions?
>
>



Re: DataView.RowFilter and DateTime column by Val

Val
Thu Apr 28 19:51:11 CDT 2005

Hi,

You need to wrap dates into # (and you did it already), but I believe you
need to pass them in a different format - it either mm/dd/yyyy format or
format defined in a regional settings of your PC.
--
Val Mazur
Microsoft MVP

http://xport.mvps.org



"Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
news:%23903vVBTFHA.2336@TK2MSFTNGP12.phx.gbl...
> I'm trying to set the RowFilter = "MyDateTimeColumn in ('2005-02-21')" but
> it returns 0 rows. I know the row is there. If change the RowFilter to
> RowFilter = "MyDateTimeColumn not in (all the other dates but 2005-02-21)
> it
> returns the rows.
>
> Any suggestions?
>
>



Re: DataView.RowFilter and DateTime column by Joe

Joe
Fri Apr 29 08:39:03 CDT 2005

I tracked down my problem. The issue was the time. The data grid didn't
display the time so I loaded the datetime column into a listbox and saw the
time was actually 2AM for all records. I was able to come up with a way of
tracking this time and added it to my RowFilter.

"Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
news:#903vVBTFHA.2336@TK2MSFTNGP12.phx.gbl...
> I'm trying to set the RowFilter = "MyDateTimeColumn in ('2005-02-21')" but
> it returns 0 rows. I know the row is there. If change the RowFilter to
> RowFilter = "MyDateTimeColumn not in (all the other dates but 2005-02-21)
it
> returns the rows.
>
> Any suggestions?
>
>