IDocumentInfo3 Interface - datesaved

04-20-2015 02:15 PM
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
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

0 Kudos
Regular Contributor II

Did you try using the object in the ITime interface?

ITime Interface 

0 Kudos