Home All Groups Group Topic Archive Search About

data view row filter and SQL commands like DATEDIFF?

Author
10 Feb 2006 8:19 PM
Brian Henry
Can you use sql server commands like this

dv.RowFilter = "datediff(d, OrderDate, getdate()) >= 2850 "


in a row filter? or will i have to do it another way? thanks!

Author
10 Feb 2006 8:51 PM
Miha Markic [MVP C#]
For a list of functionality go see DataColumn.Expression help topic.
And I don't think you'll be able to achieve that. Perhaps you might add a
"manually" calculated column which would store days (you would fill it with
your code) and do filtering on that row.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"Brian Henry" <nospam@nospam.com> wrote in message
news:e8HTA9nLGHA.916@TK2MSFTNGP10.phx.gbl...
> Can you use sql server commands like this
>
> dv.RowFilter = "datediff(d, OrderDate, getdate()) >= 2850 "
>
>
> in a row filter? or will i have to do it another way? thanks!
>

AddThis Social Bookmark Button