%Library.TimeStamp
datatype class %Library.TimeStamp extends %Library.DataType
ODBC Type: TIMESTAMP
The %TimeStamp data type class represents a time stamp value. The logical value of this data type is in ODBC format:YYYY-MM-DD HH:MM:SS.nnnnnnnnnFor example, the following expression returns the current date and time in the format needed for this data type:
$zdatetime($horolog,3)
.
See the documentation for $zdatetime
and $horolog.
The function $System.SQL.Functions.DATEDIFF() can be used to return intervals between two %TimeStamp values. The function $System.SQL.Functions.DATEADD() can be used to add a certain number of date parts (such as years, hours, or days) to a specified timestamp. See the class %SYSTEM.SQL.Functions for details.
Method Inventory
- DisplayToLogical()
- IsValid()
- LogicalToDisplay()
- LogicalToXSD()
- Normalize()
- OdbcToLogical()
- XSDToLogical()
Parameters
The display values are returned by the LogicalToDisplay method.
Methods
YYYY-MM-DD HH:MM:SS[.nnnnnnnnn]
format.
The Logical value and Display values are the same unless there are VALUELIST and DISPLAYLIST parameters specified.
Returns the value of the input string %val as a Logical timestamp value (YYYY-MM-DD HH:MM:SS[.nnnnnnnnn]
format).
YYYY-MM-DD HH:MM:SS[.nnnnnnnn]
format, is valid.
The validation is based on the class parameter settings used for the
class attribute this data type is associated with.
In this case, MAXVAL and MINVAL.YYYY-MM-DD HH:MM:SS[.nnnnnnnnn]
, into a display string.
The Logical value and Display values are the same unless there are VALUELIST and DISPLAYLIST parameters specified.
Returns the Display Timestamp value of the Logical Timestamp string %val.
Returns the logical Timestamp value of the ODBC Timestamp string %val.