IDocumentInfo3 Interface - datesaved

3185
2
04-20-2015 02:15 PM
Jose_LuisGarcinuno-Oporto
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.

0 Kudos
2 Replies
DuncanHornby
MVP Notable 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
0 Kudos
FreddieGibson
Occasional Contributor III

Did you try using the object in the ITime interface?

ITime Interface

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

0 Kudos