A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Convert double value return by Outlook api to CTime



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 26th 06, 03:26 PM posted to microsoft.public.outlook.program_vba
amit deshpande
external usenet poster
 
Posts: 3
Default Convert double value return by Outlook api to CTime

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 it is a
double value and it is very small value i.e 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
  #2  
Old June 26th 06, 05:50 PM posted to microsoft.public.outlook.program_vba
Dan Mitchell
external usenet poster
 
Posts: 58
Default Convert double value return by Outlook api to CTime

"amit deshpande" wrote in
oups.com:
i haven't understood the value that GetBirthDay() returns it is a
double value and it is very small value i.e 5 digits only.
so it can't be no of miliseconds or seconds from 1970's


It's a DATE. (int part = days since midnight dec 1899, fractional part =
portion of the day); you can read this as COleDateTime if you want an
easier way to access it.

-- dan
  #3  
Old June 27th 06, 05:56 AM posted to microsoft.public.outlook.program_vba
amit deshpande
external usenet poster
 
Posts: 3
Default Convert double value return by Outlook api to CTime


Dan Mitchell wrote:
"amit deshpande" wrote in
oups.com:
i haven't understood the value that GetBirthDay() returns it is a
double value and it is very small value i.e 5 digits only.
so it can't be no of miliseconds or seconds from 1970's


It's a DATE. (int part = days since midnight dec 1899, fractional part =
portion of the day); you can read this as COleDateTime if you want an
easier way to access it.

-- dan



thank u i have succeeded in doing it

thnax and regards
Amit Deshpande

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Date given by outlook api to java date amit deshpande Outlook - General Queries 0 June 26th 06 03:24 PM
Outlook return address issues Joejean Outlook - Installation 0 June 24th 06 07:30 PM
Outlook Account Management API Rom Add-ins for Outlook 2 June 8th 06 03:54 PM
Outlook Send/Receive API Colin Bowern Outlook and VBA 0 June 7th 06 04:36 PM
Outlook Calendar API [email protected] Outlook - General Queries 2 March 13th 06 05:11 AM


All times are GMT +1. The time now is 03:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.