dateTimeFormat
指定 IPropertyDescription::FormatForDisplay 應如何將屬性的值格式化為字元串。 只有當 <displayInfo displayType=“DateTime”>時才適用。 每個 displayInfo 元素應該只有一個 dateTimeFormat 元素。
如果有多個元素,則會使用最後一個專案。 如果未提供 dateTimeFormat 專案,則會將預設屬性設定套用至屬性描述。
語法
<!-- dateTimeFormat -->
<xs:element name="dateTimeFormat" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="formatAs">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="General"/>
<xs:enumeration value="Month"/>
<xs:enumeration value="YearMonth"/>
<xs:enumeration value="Year"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="formatTimeAs">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ShortTime"/>
<xs:enumeration value="LongTime"/>
<xs:enumeration value="HideTime"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="formatDateAs">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ShortDate"/>
<xs:enumeration value="LongDate"/>
<xs:enumeration value="HideDate"/>
<xs:enumeration value="RelativeShortDate"/>
<xs:enumeration value="RelativeLongDate"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
元素資訊
Parent 元素 | 子專案 |
---|---|
displayInfo | 沒有 |
屬性
屬性 | 描述 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
formatAs | 公共。 自選。 預設值為 「General」。 以下是有效的值。
|
||||||||||||
formatTimeAs | 公共。 自選。 預設值為 “ShortTime”。 指定要顯示時間的格式。 當 formatAs=“General”時適用。 以下是有效的值。
|
||||||||||||
formatDateAs | 公共。 自選。 預設值為 “ShortDate”。 指定要顯示日期的格式。 當 formatAs=“General”時適用。 以下是有效的值。
|