Skip to main content

%MV.Date

datatype class %MV.Date extends %Library.DataType

ODBC Type: DATE

The %MV.Date data type class represents a MultiValue date.

The MultiValue start date is 01/01/1968
Cache' start date is 01/01/1841

To convert a Cache' date ($h) to a MultiValue date:
MVdate = CACHEdate - 46385

To convert a MultiValue date to a Cache' date:
CACHEdate = MVdate + 46385

Method Inventory

Parameters

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.

parameter FORMAT;
The format specification for the data type's display value. The value of the FORMAT parameter corresponds to the available parameters of the $ZDATE and $ZDATEH functions, which are used to perform the formatting.
parameter MAXVAL;
The maximum allowed logical value for the data type.
parameter MINVAL;
The minimum allowed logical value for the data type.
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.
parameter XSDTYPE = date;
Declares the XSD type used when projecting XML Schemas.

Methods

classmethod DateToLogical(%val As %Library.Date) as %MV.Date
Converts %Library.Date value to %MV.Date value
classmethod DisplayToLogical(%val As %String) as %MV.Date
Converts the input value %val, which represents a date, into an MV Date format.

Returns the logical (MV Date) value of the input string %val.

classmethod IsValid(%val As %CacheString) as %Status
Tests if the logical value %val, which represents a date in MV Date 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.
classmethod LogicalToDate(%val As %MV.Date) as %Library.Date
Converts logical %MV.Date value to %Library.Date value
classmethod LogicalToDisplay(%val As %Date) as %String
Converts the value of %val, which is in logical MV Date format, into a display string. The formatting is based on the value of the FORMAT parameter.

Returns the formatted value of %val.

classmethod LogicalToOdbc(%val As %MV.Date = "") as %String
Converts %val, which represents a date in logical MV Date format, into ODBC date format.

Returns the ODBC date string for the logical (MV Date) value %val.

classmethod LogicalToXSD(%val As %MV.Date) as %String
Converts the MV Date value to the canonical SOAP encoded value.
classmethod Normalize(%val As %String) as %MV.Date
Converts %val to a normalized value.
classmethod OdbcToLogical(%val As %String = "") as %MV.Date
Converts %val, which represents a date in ODBC format, into MV Date format.

Returns the MV Date value of the ODBC date string %val.

classmethod XSDToLogical(%val As %String) as %MV.Date
Converts the SOAP encoded input date value into a MV Date value.
FeedbackOpens in a new tab