Translate

Dienstag, 6. Juni 2017

APEX 5 - Quickpicks for Date_Picker



APEX 5.1.1 - Universal Theme 4.2

When using the Quickpicks feature for a field - which is quite useful ! - I wonder which value to use to achieve SYSDATE -1 for a date_picker field...?

I did ask @ the apex discussion forum....

and myself solved it as follows:
1) I created a hidden Item "P1_DATE_DEFAULT_0" to hold the default value with source = pl/sql expression : TO_DATE(SYSDATE)


2) I created a hidden Item "P1_DATE_DEFAULT_1" to hold the default value with source = pl/sql expression : TO_DATE(SYSDATE) -1

3) I created a hidden Item "P1_DATE_DEFAULT_2" to hold the default value with source = pl/sql expression : TO_DATE(SYSDATE) -2

4) Quick Picks Label_1: Today - value: &P1_DATE_DEFAULT_0.

5) Quick Picks Label_2: Yesterday - value: &P1_DATE_DEFAULT_1.

6) Quick Picks Label_3: The day before yesterday - value: &P1_DATE_DEFAULT_2.

In my (german) page it looks like:
Quick_picks_dates.PNG
and works well.

Keine Kommentare:

Kommentar veröffentlichen