default value of date picker not showing in sql query
655776Nov 21 2008 — edited Nov 26 2008Hi,
I have a tabular form page with a query similar to the following:
select emp_name, salary from emp_table where trunc(hire_date)=trunc(to_date(:P42_START_DATE))
where P42_START_DATE is the name of a date picker item.
I set the source type of the date picker to be "Only when current value in session state is null" and the value to be "select trunc(next_day(sysdate,'MON')-7) from dual;" - basically the monday of the current week. I set the sequence of the date picker to be 5, and the sequence of the region to be 10. Now, when I open this page, no data gets pulled. I checked the page source, and the value of the date picker input is being set to "17-NOV-2008", but it somehow isn't reflected in the sql query.
Data does get retrieved if I manually set the date in the date picker, but I'd like it to default to the monday of the current week. What am I doing wrong?
Thanks