Datetime
This keyword declares a DateTime variable.
Local Datetime NAMELocal Datetime NAME(DIMENSIONS)Variable Datetime NAME(DIMENSIONS)Value Datetime NAME(DIMENSIONS)Const Datetime NAME(DIMENSIONS)
Several variable declarations can be done on the same line, separated by a comma.
Local declarations create the variables in the current local variable class that is not seen by nested or calling sub-programs. The Call / Subprog, func / Funprog insulate the local variables, as well as the calls of method by fmet.
Const, Variable and Value declarations declare the arguments sent by a Call, func, or fmet. With these syntaxes, the dimensions and the index ranges can be omitted as soon as the parenthesis are present (the dimension and index ranges are defined by the calling program).
# Direct declarationsLocal Datetime NOW : # Local datetime variableLocal Datetime EVENTS_TIME(1..60), CURRENT_DATETILE : # An array of 60 datetime values and another variable# A sub-program sending date times and returning a resultFunprog SEND_TIMING(MYDATETIME)Variable Datetime MYDATETIME(,) : # A 2 dimensions matrix of datetime values is sent as reference...End SEND_STATUS# A sub-program storing datesSubprog STORE_VALUES(EVENT_DATETIME)Value Datetime EVENT_DATETIME(1..5) : # An array of 5 elements is sent (a copy is done when passing the arguments)...End
There is still a Global declaration variable that exists for variables that have to be seen in the scope of a process execution, but its use is strongly discouraged.
Datetime properties are declared with the ADATIM
data type in the data dictionary.
Every table has CREDATTIM
and UPDDATTIM
system columns. These columns are automatically added when the table is created and they are automatically filled by the framework when records are created and updated. Therefore, DateTime
declarations are rarely used.
There are no implicit type conversions for datetime. All type conversions must be explicitly specified in the script.
Datetime, datetime$, gdatetime$GlobalLocalVariableValueConstTinyintShortintDateIntegerFloatDoubleDecimalCharClbfileBlbfileUuidentInstance