C++
The metadatatype parameter specifies the type of metadata represented by the
FILETIME structure. The metadatatype parameter must be one of the following values
from the MSODOCEXMETADATA enumeration type.
Table 9. Enumerated values of MSODOCEXMETADATA
Value Description
msodocexMetadataCreationDate The creation date for the document.
msodocexMetadataModDate The last-modified date for the document.
The pftLocalTime parameter specifies a pointer to a FILETIME structure that contains the
date and time information for the metadata. The following code snippet demonstrates
how to extract this information from the structure.
C++
How the add-in incorporates the date and time metadata into the exported document
depends on the implementation details of the export code and the type of fixed-format
used in the exported document.
Publisher calls the HrFinalize method at the end of the document-export process.
C++
HRESULT HrAddDocumentMetadataDate(
    MSODOCEXMETADATA metadataType, 
    const FILETIME* pftLocalTime
);
ﾉ Expand table
SYSTEMTIME st = { 0 };
WCHAR s[100];
FileTimeToSystemTime(pfiletime, &st);
swprintf(s, 99, L" %04d-%02d-%02dT%02d:%02d:%02dZ", st.wYear % 10000, 
    st.wMonth % 100, st.wDay % 100, st.wHour % 100, st.wMinute % 100, 
    st.wSecond % 100);
HrFinalize