View Single Post
  #1  
Old June 26th 06, 03:24 PM posted to microsoft.public.outlook
amit deshpande
external usenet poster
 
Posts: 3
Default Convert Date given by outlook api to java date


hi ,
i have following code
_ContactItem contactItem;
COleException e;
OleInitialize (NULL);
_Application olApp;
MAPIFolder pFolder;
if (!olApp.CreateDispatch(_T("Outlook.Application"), &e))
{
CString strError;
strError.Format(_T("CreateDispatch() failed with error 0x%08lx"),
e.m_sc);
//AfxMessageBox(strError, MB_SETFOREGROUND);
OleUninitialize ();
return 0;
}
_NameSpace oNameSpace = olApp.GetNamespace(_T("MAPI"));
pFolder=oNameSpace.GetDefaultFolder(10);
_Items Items;
_Items pItems= pFolder.GetItems();
pContact = Items.GetFirst ();
long l = pContact.GetBirthday();//which i have to convert to long value
function returns double //value

i haven't understood the value that GetBirthDay() returns a double
value it is very small value 5 digits only
so it can't be no of miliseconds or seconds from 1970's

so does anybody know how to convert this double value to Ctime

Ads