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

$$DATETIME$$ System Variable

Syntax

$$DATETIME$$

Description

$$DATETIME$$ retrieves the current operating system date and time. You can use $$DATETIME$$ to designate a default value or range for a text item using the Initial Value or Lowest/Highest Allowed Value properties. The text item must be of the CHAR or DATETIME data type.

Use $$DATETIME$$ as a default value for form parameters. In this case, the parameter's value is computed once, at form startup.

Usage Notes

The display of system variables is governed by the format mask, either a default data type format mask or one you specify. For example, if you want the default DD-MON-YY HH:MM:SS format, you must specify a DATETIME data type. (Note that the default format mask depends on the value of NLS_LANG.)

The difference between $$DATE$$ and $$DATETIME$$ is that the time component for $$DATE$$ is always fixed to 00:00:00, compared to $$DATETIME$$, which includes a meaningful time component, such as 09:17:59.

Note: Do not use $$DATETIME$$ instead of $$DATE$$ unless to specify the time component. If, for example, you use $$DATETIME$$ with the default DATE format mask of DD-MON-YY, you would be committing values to the database that the user would not see, because the format mask does not include a time component. Then, because you had committed specific time information, when you later queried on date, the values would not match and you would not return any rows.

$$DATETIME$$ Examples

Assume that you want the value of a DATETIME text item, called ORDERDATE, to default to the current operating system date and time. When you define the ORDERDATE text item, specify $$DATETIME$$ in the Initial Value property.