-
September 10th, 2010, 09:57 PM
#1
How to put Date into VARIANT data type?
Hi all,
I want to insert a Date type into a VARIANT that will be used by a certain function that needs a Date, but requires a VARIANT* data type.
The function looks something like this:
_variant_t function(_bstr_t FriendlyName, _bstr_t SubjectName, _bstr_t SMSID, VARIANT *StartTime, VARIANT *EndTime)
I can't do anything about the data type because it is a pre-defined function.
I tried doing this, but I get an error when accessing the function:
VARIANT varDate;
VariantInit(&varDate);
COleDateTime mytime(1996,1,1,0,0,0);
varDate = _variant_t(mytime);
Also when accessing the function, I do it like this:
->function(bstrName, bstrName2, bstrID, &varDate, &varDate);
I hope somebody can help me.
Thank you!
Tags for this Thread
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
|