-
September 22nd, 2000, 12:53 AM
#1
serialize COleDateTime
i would like to know if i could serialize a COleDateTime value and retrieve it later.
Thanks
-
September 22nd, 2000, 03:44 AM
#2
Re: serialize COleDateTime
Hi,please try like this:
COleDateTime date(2000,9,21,16,0,0);
COleVariant vaTimeDate=date;
COleVariant vaTemp;
vaTemp.ChangeType(VT_BSTR,&vaTimeDate);
CString str=vaTemp.bstrVal;
Hope it helps,
Jack
-
September 22nd, 2000, 05:22 AM
#3
Re: serialize COleDateTime
can i serialize it without changing to the cstring format?
e.g
COleDateTime time = COleDateTime::GetCurrentTime();
CArchive ar(&somefile, CArchive::modeCreate + CArchive::modeWrite);
ar << time;
I tried using this and then retrieving it later but the value that i put in was different when i retrieve it.
-
January 17th, 2017, 10:46 AM
#4
Re: serialize COleDateTime
Try serializing the underlying DATE member (m_dt) inside of COleDateTime.
-
January 17th, 2017, 02:20 PM
#5
Re: serialize COleDateTime
Good reply to a 17-years old question!
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|