What I need to do is, in my mind, incredibly simple. So simple in fact that it is probably obvious and therefore I cannot seem to find any place that documents how to do this.
What I need is just to take the value of a Date Picker page Item (:P1_DATE_1) and through a dynamic action set the value of a second Date Picker page Item (:P1_DATE_2). The value of (:P1_DATE_2) should be 2 years, or 730 days, greater than the value of (:P1_DATE_1). So all I need is a simple '+730' expression right?
I had this working using sysdate as the start date for this calculation. The below PL/SQL expression gave the appropriate output:
to_char(sysdate + 730,'dd-MON-rr')
But then I could not get it to translate to accepting the value of the page item. I already have the actions and everything set up I just can't get it to function when I try substituting :P1_DATE_1 for sysdate. I have tried as many different manifestations of that expression using the page item but it does not populate the 2nd page item.
Sorry for the probably stupid question but if anyone could help out I would appreciate it. Thanks!
to_char(add_months(sysdate,24),'dd-MON-rr')
is better – Ben