How can I convert a "YYYY/MM/DD" formatted date to a VARIANT type date and vice-versa in C++?
EDIT
VARIANT VT_DATE Type passed by VBA code into an automation COM written in c++
How can I convert a "YYYY/MM/DD" formatted date to a VARIANT type date and vice-versa in C++?
EDIT
VARIANT VT_DATE Type passed by VBA code into an automation COM written in c++
Did you try via CComVariant
?
E.g. : (from string to date)
VARIANT myVBDate;
CComVariant myDate("YYYY/MM/DD date");
if (SUCCEEDED(myDate.ChangeType(VT_DATE)) && SUCCEEDED(myDate.Detach(&myVBDate)))
{
// do something with myVBDate
}