You need to make it a habit of using TO_DATE() to convert strings/varchar2s (ie C004) to a DATE data type.
Please replicate it on apex.oracle.com
Don't forget to create a developer account so you don't have to post your email for spammers to harvest.
Thanks for the quick response.
As a quick test I added TO_DATE to the p_value, but that doesn't change anything.
I will try to create a demo on apex.oracle.com tomorrow (it's 10:30 pm down here).
It took some time (longer than I anticipated) but I finally came around to creating a demo on apex.oracle.com:
I would appreciate it if anyone could help me out.
I'd call it a bug/missing feature.
It appears that within a Basic report, sorting on a column created using APEX_ITEM.DATE_POPUP2() does not sort by date.
I'd file this with Oracle Support and see what they say.
Include a link to this thread and your workspace login information.
I got something to work by: (probably not what you want.)
- using the C004 column directly. (I just added it to the SQL code)
- setting the column's attribute "Display As" to "Date Picker"
- setting the column's attribute "Number /Date Format" to DD-MM-YYYY
I suspect: since you don't start with p_idx => 1, this column becomes "1" ==> g_f01
Thanks for looking at this!
The workaround you propose is something I had in place before using the date_popup2, but I have 2 reports on 1 page both with date fields in them: in both reports the date will get f01 as id and that gives a lot of issues processing the input.
I'll create a SR with Oracle Support and report back here when I get an answer.
Thank you fac586!!!