<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing dynamic text's DateSaved Document property as text in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301890#M7830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Handling dates as double precision values for cross-language/platform use is pretty standard.&amp;nbsp; My guess would be that they decided to keep it simple as opposed to wrapping the return value in even more COM overhead.&amp;nbsp; It's also just as likely that whoever designed the IDocumentInfo2 interface wasn't even aware of the ITime interface or that they didn't really think about it too much at all.&amp;nbsp; Only ESRI really knows why they implemented it this way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2011 12:36:37 GMT</pubDate>
    <dc:creator>NeilClemmons</dc:creator>
    <dc:date>2011-12-07T12:36:37Z</dc:date>
    <item>
      <title>Accessing dynamic text's DateSaved Document property as text</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301886#M7826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to programmatically access the text displayed by the dynamic text Document DateSaved property. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe ArcGIS gets this information using IDocumentInfo2.DateSaved. However, the latter returns an Object and not an ITimeInstant or ITime as I would have expected. Furthermore, there is no documentation on how to handle this "Object".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How does one turn the Object into the text string that ArcMap displays in dynamic text elements? I wasn't able to cast the returned Object to ITimeInstant or ITime, or to set it as a Date. The object seems to be a Double. I use VB.NET.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dennis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 19:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301886#M7826</guid>
      <dc:creator>MeToo</dc:creator>
      <dc:date>2011-12-06T19:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing dynamic text's DateSaved Document property as text</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301887#M7827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The property returns an Object because not all languages have a Date data type and the ones that do vary in its implementation.&amp;nbsp; Dates can be converted to an equivalent double precision number, which is what the property does because all languages should have some implementation of a double precision data type.&amp;nbsp; In .NET you can use this to get the value:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim d As Date = Date.FromOADate(docInfo.DateSaved)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 21:35:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301887#M7827</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-12-06T21:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing dynamic text's DateSaved Document property as text</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301888#M7828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Neil for the method and explanation. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once again, I think it should have been explained on the DateSaved page of the ArcMap help system...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Phil_M of Esri suggested another method that works too:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim theDateSaved As ESRI.ArcGIS.esriSystem.ITime = New ESRI.ArcGIS.esriSystem.Time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;theDateSaved.SetFromObject(pDocumentInfo2.DateSaved)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dennis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 23:50:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301888#M7828</guid>
      <dc:creator>MeToo</dc:creator>
      <dc:date>2011-12-06T23:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing dynamic text's DateSaved Document property as text</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301889#M7829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Neil:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I gave your explanation of why IDocumentInfo2.DateSaved returns an Object a little bit more thoughts and think it would make a lot of sense if that interface and member had been developed by Esri prior to ITime, but they were both released with ArcGIS 10. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doesn't this mean that Esri could have returned ITime instead of Object as ITime seems to be available for all programming languages supported by ArcGIS? Why go the extra step? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dennis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 10:35:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301889#M7829</guid>
      <dc:creator>MeToo</dc:creator>
      <dc:date>2011-12-07T10:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing dynamic text's DateSaved Document property as text</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301890#M7830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Handling dates as double precision values for cross-language/platform use is pretty standard.&amp;nbsp; My guess would be that they decided to keep it simple as opposed to wrapping the return value in even more COM overhead.&amp;nbsp; It's also just as likely that whoever designed the IDocumentInfo2 interface wasn't even aware of the ITime interface or that they didn't really think about it too much at all.&amp;nbsp; Only ESRI really knows why they implemented it this way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 12:36:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/accessing-dynamic-text-s-datesaved-document/m-p/301890#M7830</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-12-07T12:36:37Z</dc:date>
    </item>
  </channel>
</rss>

