September 10th, 2010, 09:57 PM
How to put Date into VARIANT data type?
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:
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.
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!