IDocumentInfo3 Interface - datesaved

3019
2
04-20-2015 02:15 PM
Highlighted
New Contributor III

I need to know when the mxd was saved for last time to added to the legend.I am using these interfaces and objects.

IMxDocument pMxDoc = myApp.Document as IMxDocument;

IDocumentInfo3 pinfo = pMxDoc as IDocumentInfo3;

object date = pinfo.datesaved

is there any way to convert this value 45112.565854 (it is just an example) to this format 'mm/dd/yyyy'

the value 45112.565854 is the one that I am getting back from this property. Thanks a lot.

Reply
0 Kudos
2 Replies
Highlighted
MVP Frequent Contributor

In VBA the following code would convert to string:

Public Sub test()

    Dim v As Double

    Let v = 45112.565854

    Debug.Print CDate(v) ' prints 05/07/2023 13:34:50

End Sub

Reply
0 Kudos
Highlighted
Regular Contributor II

Did you try using the object in the ITime interface?

ITime Interface

http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0042000001sm000000 

Reply
0 Kudos