Filter DateTime using 'Now()' or Getdate()

14 posts, 0 answers
  1. cm
    cm avatar
    3 posts
    Member since:
    Sep 2012

    Posted 29 Mar 2010 Link to this post

    Hi All,
    I'm wondering if there is a best practice to filter DateTime Values - but using a runtime 'current time' value.
    (Example: Filter All 'events' WHERE StartTime < getDate())
    Thx
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 01 Apr 2010 Link to this post

    Hello Chris,

    I am afraid that I do not completely understand your question. RadFilter offers UI for user to build complex filter criteria. Thus when filter on field which type is DateTime, the user should choose the date from UI.

    Greetings,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. chris mcmurray
    chris mcmurray avatar
    1 posts
    Member since:
    Jul 2009

    Posted 12 Apr 2010 Link to this post

    Hi,
    To Clarify; The issue is about trying to use a "RunTime" Date when filtering by date.
    We are using RadFilter to allow Users to Build & Save Filters. They will run at a later date.
    I would like to use the Date that they Run...NOT the date they are Saved.

    Example:
    Data: Concerts Dates - From Jan 2009- Jan 2015
    Objective: Show Next Available ConcertDates  (based on Runtime Date)
    Filter Saved on April 2010

    RunTime : May 2014

    Filter Should kind of Look Like: 'SELECT * FROM Concerts WHERE DateStart <= eval'getDate()'

    Anyway to do this kind of thing?

    Thanks
    CM
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 16 Apr 2010 Link to this post

    Hello Chris,

    I am afraid that this is not supported by RadFilter. In general you can get the collection of build expression by RadFilter in RootGroup. Using the collection you can build your custom expression that will be saved.

    Kind regards,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. apb
    apb avatar
    46 posts
    Member since:
    Nov 2008

    Posted 11 Jun 2010 Link to this post

    I have the same need for relative date filters. We also persist the filters and date filters such as "1 Day", "1 Week", etc, would  be far more useful.
  7. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 17 Jun 2010 Link to this post

    Hello Al,

    I can offer you implementing custom editor for RadFilter that have an option for choosing options. I have attached sample implementation to this post. Give it a try.

    All the best,
    Regards
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. cm
    cm avatar
    3 posts
    Member since:
    Sep 2012

    Posted 21 Jun 2010 Link to this post

    Hi guys,
    first of all - thanks for the Code & the effort.
    My Question is this:

    "OnFieldEditorCreating" and class RadFilterFieldEditorCreatingEventArg...

    I don't seem to have these in my version of RadFilter...
    Is this code for the upcoming Q2 release?

    Thanks,

  9. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 22 Jun 2010 Link to this post

    Hello chris,

    If you use the latest SP release of the suite (2010.1.519), you should have OnFieldEditorCreating server event exposed for RadFilter. Upgrade instructions are available here.

    Best regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Anne
    Anne avatar
    39 posts
    Member since:
    May 2010

    Posted 27 Jul 2010 Link to this post

    I try to add this code in my asp.net application in vb with visual studio 2008.

    I add

    <%

    @ Register TagPrefix="custom" Namespace="FilterEditors" %>

     

     

     

     

     

     in my page
    and FilterEditors.vb in my solution

    but Imports FilterEditors is not recognize.
    I have the same probleme with namespace CustomEditors to do RadFilterDropDownEditor

    Will you add an expression like date() and date()+1, and 'RadFilterDropDownEditor' in a next release ?

    Anne


  11. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 30 Jul 2010 Link to this post

    Hello Anne,

    Bellow you can find VB version of the page from my previous posts.

    Regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Anne
    Anne avatar
    39 posts
    Member since:
    May 2010

    Posted 30 Jul 2010 Link to this post

    Thanks Nikolay
    I will test it soon.
  13. Anne
    Anne avatar
    39 posts
    Member since:
    May 2010

    Posted 03 Aug 2010 Link to this post

    Hello Nikolay,

    <

     

    custom:MyEditor> is not recognize in my web application.

    I add namespace="FilterEditors" in the web.config : no success !

    Anne

     

     

  14. Anne
    Anne avatar
    39 posts
    Member since:
    May 2010

    Posted 04 Aug 2010 Link to this post

    Hello Nikolay,

    I find my problem. My solution :

    <%

    @ Register TagPrefix="custom" Namespace="MyProject" Assembly="MyProject" %>
    and I don't use namespace in the assembly 'MyEditor'

    Anne

     

  15. Anne
    Anne avatar
    39 posts
    Member since:
    May 2010

    Posted 03 Sep 2010 Link to this post

    Hello Nikolay,

    I undestand why my code doesn't work. I try to add FieldEditors to my RadFilter. But my RadFilter has a FilterContainerID.

    Sometime, I have more than 50 columns in my container so I don't want make 50 FieldEditors.

    So I make my owner filter to use getdate() or getdate()-1 or getdate()+4.

    Anne
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017