I have a date picker item on a page. It has to get a default date from a pl/sql function. So in the default settings i chose "PL/SQL Function Body" and put the following code:
return get_next_order_day('01.11.2016',25561083094865039905655156459737368851,282826580029217770589638046567612872721);
Note: this is a test example. In reality i need to pass values from three items on the page (which also doesn't work).
In this example the function returns the date '02.11.2016' but the correct date should be '04.11.2016'
The problem is the function doesn't return the correct value. When i test the function in SQLDEVELOPER IT WORKS CORRECTLY. So i know its not the function itself. Am i missing something somewhere?
The problem was in the session languages. When calling the function from sqldeveloper i had one session language so the function calculated the date in one way, and when calling the function from apex application, i had another session language so the function calculated the date differently.