11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$$DATETIME$$ system variable<br />

Syntax<br />

$$DATETIME$$<br />

Description<br />

$$DATETIME$$ retrieves the current operating system date and time. You can use $$DATETIME$$<br />

to designate a default value or range for a text item using the Initial Value or Lowest/Highest Allowed<br />

Value properties. The text item must be of the CHAR or DATETIME data type.<br />

Use $$DATETIME$$ as a default value for form parameters. In this case, the parameter’s value is<br />

computed once, at form startup.<br />

Usage Notes<br />

The display of system variables is governed by the format mask, either a default data type format mask or<br />

one you specify. For example, if you want the default DD-MON-YY HH:MM:SS format, you must<br />

specify a DATETIME data type. (Note that the default format mask depends on the value of<br />

NLS_LANG.)<br />

The difference between $$DATE$$ and $$DATETIME$$ is that the time component for $$DATE$$ is<br />

always fixed to 00:00:00, compared to $$DATETIME$$, which includes a meaningful time component,<br />

such as 09:17:59.<br />

Note: Do not use $$DATETIME$$ instead of $$DATE$$ unless to specify the time component. If, for<br />

example, you use $$DATETIME$$ with the default DATE format mask of DD-MON-YY, you would be<br />

committing values to the database that the user would not see, because the format mask does not include<br />

a time component. Then, because you had committed specific time information, when you later queried<br />

on date, the values would not match and you would not return any rows.<br />

$$DATETIME$$ examples<br />

Assume that you want the value of a DATETIME text item, called ORDERDATE, to default to the<br />

current operating system date and time. When you define the ORDERDATE text item, specify<br />

$$DATETIME$$ in the Initial Value property.<br />

369

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!