SdtDateMappingType.Val Property

Date Storage Type.Represents the attribte in schema: w:val

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<SchemaAttrAttribute(, "val")> _
Public Property Val As EnumValue(Of DateFormatValues)
    Get
    Set
'Usage
Dim instance As SdtDateMappingType
Dim value As EnumValue(Of DateFormatValues)

value = instance.Val

instance.Val = value
[SchemaAttrAttribute(, "val")]
public EnumValue<DateFormatValues> Val { get; set; }

Property Value

Type: DocumentFormat.OpenXml.EnumValue<DateFormatValues>
Returns EnumValue<T>.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the type of date translation which shall be applied to the parent date picker structured document tag.

If this attribute is omitted, this its value shall be assumed to be text.

Consider the following date picker structured document tag:

<w:sdt>
  <w:sdtPr>
    <w:date … >
      <w:storeMappedDateAs w:val="date"/>
      …
    </w:date>
  </w:sdtPr>
  <w:sdtContent>
    <w:r>
      <w:t>January 1</w:t>
    </w:r>
  </w:sdtContent>
</w:sdt>

The value of the val attribute is text; therefore, the current run contents shall be sent to the mapped XML element after being translated into xsd:date format (in this case, the value shall be 01-01-2006).

The possible values for this attribute are defined by the ST_SdtDateMappingType simple type.

See Also

Reference

SdtDateMappingType Class

SdtDateMappingType Members

DocumentFormat.OpenXml.Wordprocessing Namespace