如何在APEX_ITEM.DATE_POPUP中默认填充SYSDATE?
How to Default APEX_ITEM.DATE_POPUP to SYSDATE
Got it, let's tweak your code to get SYSDATE as the default value for your date popup. Right now your third parameter uses ISSUED_DATE as the pre-filled date—we just need to adjust that part to prioritize SYSDATE when needed.
Here's the modified code you can use right away:
APEX_ITEM.DATE_POPUP (2, ROWNUM, NVL(ISSUED_DATE, SYSDATE), 'dd-mon-yyyy')
Let me break this down clearly:
- The third parameter in
APEX_ITEM.DATE_POPUPcontrols the default displayed date. UsingNVL()here gives us flexibility:- If
ISSUED_DATEhas a non-null value, it will still show that as expected. - If
ISSUED_DATEis null, it will fall back toSYSDATEas the default selection.
- If
- If you want every instance to default to SYSDATE (ignoring
ISSUED_DATEentirely), you can simplify it even more:APEX_ITEM.DATE_POPUP (2, ROWNUM, SYSDATE, 'dd-mon-yyyy')
Quick sanity check: Your date format mask 'dd-mon-yyyy' works perfectly with SYSDATE—APEX will automatically format the system date to match this pattern for the popup.
内容的提问来源于stack exchange,提问作者vg dutt
相关产品推荐
相关产品推荐

