%Library.StringTimeStamp
Class %Library.StringTimeStamp Extends %DataType [ ClientDataType = TIMESTAMP, SqlCategory = TIMESTAMP, System = 2 ]
The %StringTimeStamp data type class represents a time stamp value.
The logical value of the %TimeStamp data type is in YYYY-MM-DD HH:MM:SS
format.
Parameters
VALUELIST;
Parameter VALUELIST;
Used for enumerated (multiple-choice) attributes. VALUELIST is either a null string ("") or a delimiter separated list (where the delimiter is the first character) of logical values. If a non-null value is present, then the attribute is restricted to values in the list, and the validation code simply checks to see if the value is in the list.
MAXVAL;
Parameter MAXVAL;
The maximum allowed logical value for the data type.
MINVAL;
Parameter MINVAL;
The minimum allowed logical value for the data type.
DISPLAYLIST;
Parameter DISPLAYLIST;
Used for enumerated (multiple-choice) attributes. Used in conjunction with the VALUELIST parameter for enumerated (multiple-choice) attributes. DISPLAYLIST, if not null, represents the display values for the attribute corresponding with the logical values listed in VALUELIST.
The display values are returned by the LogicalToDisplay method.
XMLTIMEZONE
Parameter XMLTIMEZONE [ Constraint = "IGNORE,UTC", Flags = ENUM ] = "UTC";
XMLTIMEZONE specifies the handling of timezone part of the XML format dateTime. "UTC" means convert to UTC on input. "IGNORE means ignore the timezone.
XMLDEFAULTVALUE
Parameter XMLDEFAULTVALUE As STRING [ Internal ];
XMLDEFAULTVALUE specifies the value to use if the date fails validity check by $zdatetimeh. By default "" is used which will result in an XMLImport error. A dateTime such as "1841-01-1 00:00:00" may be specified to replace dates such as 0001-01-01 00:00:00 which are not valid %TimeStamp dates.
XSDTYPE
Parameter XSDTYPE = "dateTime";
Declares the XSD type used when projecting XML Schemas.
JSONTYPE
Parameter JSONTYPE = "string";
JSONTYPE is JSON type used for this datatype.
Methods
XSDToLogical
ClassMethod XSDToLogical(%val As %String) As %StringTimeStamp [ CodeMode = generator, ServerOnly = 1 ]
Converts the SOAP encoded input dateTime value into a %TimeStamp value.
LogicalToXSD
ClassMethod LogicalToXSD(%val As %StringTimeStamp) As %String [ CodeMode = generator, ServerOnly = 1 ]
Converts the %StringTimeStamp value to the canonical SOAP encoded value.
OdbcToLogical
ClassMethod OdbcToLogical(%val As %String) As %TimeStamp [ CodeMode = expression, ServerOnly = 1 ]
Converts %val, which represents either a Timestamp in ODBC format, or a Date in ODBC format, into a logical Timestamp value.
Returns the logical Timestamp value of the ODBC Timestamp string %val.
DisplayToLogical
ClassMethod DisplayToLogical(%val As %String) As %TimeStamp [ CodeMode = generator, ServerOnly = 0 ]
Converts the input value %val, which represents a timestamp value, to YYYY-MM-DD HH:MM:SS
format.
Returns the value of the input string %val as a timestamp value (YYYY-MM-DD HH:MM:SS
format).
IsValid
ClassMethod IsValid(%val As %RawString) As %Status [ CodeMode = generator, ServerOnly = 0 ]
Tests if the logical value %val, which represents a timestamp value in YYYY-MM-DD HH:MM:SS
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.
LogicalToDisplay
ClassMethod LogicalToDisplay(%val As %TimeStamp) As %String [ CodeMode = generator, ServerOnly = 0 ]
Converts the value of %val, which is in logical format YYYY-MM-DD HH:MM:SS
, into a display string. The formatting is based on the value of the FORMAT parameter.
Returns the formatted value of %val.
Normalize
ClassMethod Normalize(%val As %RawString) As %TimeStamp [ CodeMode = expression, ServerOnly = 1 ]
Transforms integer values into timestamp.