GetDynamicDateTime PowerScript function
Description
Obtains data of type DateTime from the DynamicDescriptionArea
after you have executed a dynamic SQL statement.
Restriction
You can use this function only after
executing Format 4 dynamic SQL statements.
Syntax
|
1 |
<span>DynamicDescriptionArea</span><span>.GetDynamicDateTime </span>( <span>index</span> ) |
|
Argument |
Description |
|---|---|
|
DynamicDescriptionArea |
The name of the DynamicDescriptionArea, |
|
index |
An integer identifying the output parameter descriptor |
Return Values
DateTime. Returns the DateTime data
in the output parameter descriptor identified by index in DynamicDescriptionArea.
Returns 1900-01-01 00:00:00.000000 if
an error occurs. If any argument’s value is null, GetDynamicDateTime returns null.
Usage
Use GetDynamicDateTime when the value of
OutParmType is TypeDateTime! for the value that you want to retrieve
from the array.
To test for the error value, you must use the DateTime function
to construct the value to which you want to compare the returned
value. PowerBuilder does not support DateTime literals.
Examples
These statements set SystemDateTime to
the DateTime data in the second output parameter
descriptor:
|
1 |
DateTime SystemDateTime |
|
1 |
SystemDateTime = SQLDA.<span>GetDynamicDateTime</span>(2) |
|
1 |
IF SystemDateTime = & |
|
1 |
DateTime(1900-01-01, 00:00:00) THEN |
|
1 |
... // Error handling |
|
1 |
END IF |
For an example of retrieving data from the DynamicDescriptionArea,
see GetDynamicDate.
See Also
-
GetDynamicDate, GetDynamicNumber, GetDynamicString, GetDynamicTime, SetDynamicParm, Using dynamic SQL