This discussion is archived
5 Replies Latest reply: Feb 2, 2013 5:02 AM by Howard (... in Training) RSS

How to use From date and To date

upen Newbie
Currently Being Moderated
Hi,

How to change the chart values using From date Picker and To Date picker.

Thanks in Advance
Upendran
  • 1. Re: How to use From date and To date
    Joni Vandenberghe Pro
    Currently Being Moderated
    Not sure what you mean but if by chart you mean calendar there is a plug-in for that:
    http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/clarifit-from-to-date-picker_154.html

    Edited by: Joni Vandenberghe on 30-jan-2013 0:24
  • 2. Re: How to use From date and To date
    Paul Broughton Pro
    Currently Being Moderated
    Hi,

    If your wanting to limit what is displayed in a chart baed on a date you could use a query similar to below. You would need to create 2 page items and a button to submit the page.
    select null link,
           ename label,
           sal value
    from   emp
     where hiredate between :P13_START_DATE and :P13_END_DATE
    order  by ename;
    Alternatively if your using APEX 4 or above you could use a dynamic action if you don't want to submit the page.

    Thanks

    Paul
  • 3. Re: How to use From date and To date
    upen Newbie
    Currently Being Moderated
    Hi Paul,

    M-Thanks for your reply.

    I tried the My query and your query also but chart is not displaying.

    My query is

    select null link, RSCNM label, round(SUM(GUDPDTWGHT /1000),2) as quantity FROM DPRODUCTIONREP
    WHERE SLIPDATE between '01/21/2013' and '01/25/2013'
    AND DEPTNM LIKE 'No1 Process Line'
    GROUP BY RSCNM

    Regards,
    Upendran
  • 4. Re: How to use From date and To date
    upen Newbie
    Currently Being Moderated
    M-Thanks for your Reply

    How to use Clarifit FROM TO DATE PICKER

    I am using this query

    select null link, RSCNM label, SUM(GUDPDTWGHT) value1
    from "TEST"."DPRODUCTIONREP" where deptnm like 'No1 Process Line' and slipdate between to_date(to_char(':P2_START_DATE'), 'MM/DD/YYYY') and to_date(to_char(':P2_END_DATE'), 'MM/DD/YYYY')
    group by RSCNM

    Regards,
    Upendran
  • 5. Re: How to use From date and To date
    Howard (... in Training) Pro
    Currently Being Moderated
    Hi Upendran,

    Are you meaning that you get a "No data found." message. If so, either there is No data or the query is off somewhere.
    select null link, RSCNM label, SUM(GUDPDTWGHT) value1
    from "TEST"."DPRODUCTIONREP" where deptnm like 'No1 Process Line' and slipdate between to_date(to_char(':P2_START_DATE'), 'MM/DD/YYYY') and to_date(to_char(':P2_END_DATE'), 'MM/DD/YYYY')
    group by RSCNM
    Hint: The FAQ -- in the Welcome block at the upper right of the screen -- tells how to format code and how to quote. It can make it easier for all to understand sometimes.

    In this query,
    - you use "like" but not with a "%" which seems curious
    - TO_CHAR is not necessary because the bind variables (page items) are just character strings anyway. So, you should need only TO_DATE(:P2_END_DATE, 'MM/DD/YYYY'). I'm pretty sure there is no need to quote :P2_END_DATE.

    Have you run the query as an SQL command to see what it produces? When I have a tough query, I select SQL Workshop > SQL Commands and run it there to see what's off.

    Regards,
    Howard

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points