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;


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!