PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET data view row filter and SQL commands like DATEDIFF?

Reply

data view row filter and SQL commands like DATEDIFF?

 
Thread Tools Rate Thread
Old 10-02-2006, 08:19 PM   #1
Brian Henry
Guest
 
Posts: n/a
Default data view row filter and SQL commands like DATEDIFF?


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!


  Reply With Quote
Old 10-02-2006, 08:51 PM   #2
Miha Markic [MVP C#]
Guest
 
Posts: n/a
Default Re: data view row filter and SQL commands like DATEDIFF?

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/

"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!
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off