Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date picker format

KanishkaaNov 7 2013 — edited Nov 7 2013


Hi all,

     I have an apex page where 2 date pickers are there (ie) from_date  and   to_date

After selecting these dates and if submit button is pressed, a report is shown which is fetched via a query.

Report query :

select * from (select table_name,to_char(to_date(STATS_FROM_TIMESTAMP, 'yyyy-mm-dd:hh24:mi:ss'),'dd-mm-yyyy hh24:mi:ss') "STATS_FROM_TIMESTAMP"

from table_history where to_char(to_date(STATS_FROM_TIMESTAMP, 'yyyy-mm-dd:hh24:mi:ss')) >= :P11_X1

and to_char(to_date(STATS_FROM_TIMESTAMP, 'yyyy-mm-dd:hh24:mi:ss')) <= :P11_X2

Here :P11_X1 and :P11_X2 are datepicker items.

Condition for the report query to display is :

select 1 from dual where :P11_X1 >= (select sysdate-8 from dual) and :P11_X2 <= (select sysdate from dual) and :P11_X2 >= :P11_X1 and :P11_X3 is not null

Now my issue is,

if suppose I give 30th october in :P11_X1 and 1st november in :P11_X2 its showing an error of

"from_date should be greater than to_date"

How to resolve this issue? I tried out many a things, but still I did not get the correct thing.

Pls help me out.

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2013
Added on Nov 7 2013
1 comment
1,720 views