SdtContentDate Class

Date Structured Document Tag.When the object is serialized out as xml, its qualified name is w:date.

Inheritance Hierarchy


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


<ChildElementInfoAttribute(GetType(LanguageId))> _
<ChildElementInfoAttribute(GetType(Calendar))> _
<ChildElementInfoAttribute(GetType(DateFormat))> _
<ChildElementInfoAttribute(GetType(SdtDateMappingType))> _
Public Class SdtContentDate _
    Inherits OpenXmlCompositeElement
Dim instance As SdtContentDate
public class SdtContentDate : OpenXmlCompositeElement


The following table lists the possible child types:

  • DateFormat <w:dateFormat>

  • LanguageId <w:lid>

  • SdtDateMappingType <w:storeMappedDataAs>

  • Calendar <w:calendar>

[ISO/IEC 29500-1 1st Edition] date (Date Structured Document Tag)

This element specifies that the parent structured document tag shall be a date picker when displayed in the document.

This setting specifies that the behavior for this structured document tag shall be as follows:

  • The child elements of this element specify how the dates in this structured document tag shall be stored in any mapped custom XML data and displayed in the document

  • Formatting applied to any part of this structured document tag's contents shall apply to its entire contents

As well, the structured document tag shall satisfy the following restraints or the document shall be considered non-conformant:

  • The contents shall only be contain a single run (one set of formatting properties)

  • The contents shall not contain more than a single paragraph or table cell and shall not contain a table row or table cell

[Example: Consider the following structured document tag:


The date element in this structured document tag's properties specifies that the type of structured document tag is a date picker. end example]

Parent Elements

sdtPr (§

Child Elements


calendar (Date Picker Calendar Type)


dateFormat (Date Display Mask)


lid (Date Picker Language ID)


storeMappedDataAs (Custom XML Data Date Storage Format)




fullDate (Last Known Date in XML Schema DateTime Format)

Specifies the full date and time last entered into the parent structured document tag using the standard XML Schema DateTime syntax.

[Note: This cache is used because the date display mask stored on the dateFormat element (§ might not contain all of the information about the date, which might be needed if the date display mask is later changed. end note]

If this attribute is specified, then the current fullDate attribute shall be used to populate the run content of the parent structured document tag by filtering it through the date display mask specified in the dateFormat element, if one is present.

If this attribute is omitted, then the current display text shall be maintained when the document is displayed.

[Example: Consider the following structured document tag properties:

<w:date w:fullDate="2006-01-01T05:30:00Z">

The full XML Schema DateTime format for the current structured document tag is specified via the fullDate attribute value as 2006-01-01T05:30:00Z. end example]

The possible values for this attribute are defined by the ST_DateTime simple type (§17.18.9).

[Note: The W3C XML Schema definition of this element’s content model (CT_SdtDate) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


SdtContentDate Members

DocumentFormat.OpenXml.Wordprocessing Namespace