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!

Current date / sysdate issue, no match with time display in APEX

FofanaDec 6 2016

Hi all,

I have a very simple requirement to filter an IR passing parameter in the URL.

On page 1 I have this link to branch to my IR (page 2) and set IR filter to INCIDENT_DUE_DATE < current_date

select 'Tickets Pass Due' label

  ,Incident\_pass\_due

  ,'f?p='||:APP\_ID||':2:'||:APP\_SESSION||':::2,RIR,RP,CIR:IRLT\_INCIDENT\_DUE\_DATE:'||(to\_char(current\_date,:G\_DATE\_FORMAT)) url

from table..

where...

(btw :G_DATE_FORMAT = 'DD MONTH YYYY HH24:MI')

In APEX I have the current date 06 DECEMBER 2016 10:00 although it's 01:57 PM now

pastedImage_4.png

In the database I have

select sysdate, current_date from dual;

gives me this: the location being Montreal/Canada I guest that is timezone.

But my question how can I filter the data against the "right" time, the risk I might end up not showing some due tickets because of wrong hour

pastedImage_5.png

I have tried to use TIMESTAMP with local time zone as datatype in the database but there is another issue with that:

On that IR report I am doing something like this to set color according to due date and it seems, I can not do that with that datatype

select decode(incident_due_date

                 ,null

                ,null

               ,case

                when (incident\_due\_date - sysdate) > (select get\_incident\_treshold() from dual) then 'green'

                when (0 \<= incident\_due\_date - sysdate) and (incident\_due\_date - sysdate \<= (select get\_incident\_treshold() from dual)) then 'orange'

               else 'red'

               end) incident\_color

from table....

where ....

So any idea? Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2017
Added on Dec 6 2016
0 comments
268 views