Datetime Intrinsic Functions - AsValue Method
Return the variable as a value if SQLNull
Member of Datetime Intrinsic Functions (PRIM_LIBI.IDateTimeIntrinsics)
Parameters
Name |
Type |
Data Type |
Description |
Result |
*Result (Optional) |
DateTime |
Resulting value |
Default |
*Input (Optional) |
DateTime |
Value to use when the variable is SQLNull |
Details
AsValue allows you to better handle *SQLNull. Rather than having to test for a potential SQLnull, AsValue allows a variable to return a specified value.
Example
Rather than having to test as below
If ((#Variable = #Today) *or (#Variable.IsSqlNull)
...
AsValue allows the following
If (#Variable.AsValue(#Today))
...