A script-enabled browser is required for this page to function properly.

Date and Time System Default Values

Oracle Forms supplies six special default values $$DATE$$, $$DATETIME$$, $$TIME$$, $$DBDATE$$, $$DBDATETIME$$, and $$DBTIME$$ that supply date and time information. These variables have the and the following special restrictions on their use:

  • When accessing a non-ORACLE datasource, avoid using $$DBDATE$$ and $$DBDATETIME$$. Instead, use a When-Create-Record trigger to select the current date in a datasource-specific manner.
  • Use $$DATE$$, $$DATETIME$$, and $$TIME$$ to obtain the local system date/time; use $$DBDATE$$, $$DBDATETIME$$, and $$DBTIME$$ to obtain the database date/time, which may differ from the local system date/time when, for example, connecting to a remote database in a different time zone.
  • Use these variables only to set the value of the Initial Value, Highest Allowed Value or Lowest Allowed Value property.
  • About system variables Examples

    Assume that you want to create a Key-NXTBLK trigger at the form level that navigates depending on what the current block is. The following trigger performs this function, using :SYSTEM.CURSOR_BLOCK stored in a local variable:

    DECLARE
    curblk VARCHAR2(30);
    BEGIN
    curblk := :System.Cursor_Block;
    IF curblk = 'Orders'
    THEN Go_Block('Items');
    ELSIF curblk = 'Items'
    THEN Go_Block('Customers');
    ELSIF curblk = 'Customers'
    THEN Go_Block('Orders');
    END IF;
    END;

    Uppercase Return Values

    All system variables are case-sensitive, and most return their arguments as uppercase values. This will affect the way you compare results in IF statements.