How can I convert the variant into date??
_variant_t vTDate;
// Get the date from database
vTDate = rst->GetCollect(L"TDATE");
/*
From the result I got,
vTDate = {21/03/2001 12:00:00 AM VT_DATE}
vTDate.date = 36971.000000000
*/
Please help :(
Printable View
How can I convert the variant into date??
_variant_t vTDate;
// Get the date from database
vTDate = rst->GetCollect(L"TDATE");
/*
From the result I got,
vTDate = {21/03/2001 12:00:00 AM VT_DATE}
vTDate.date = 36971.000000000
*/
Please help :(
Try using the ctime or _wctime. Both are return char and wchar_t
regards,
:)
:confused: I think I didn't make myself clear.
What I want from the return value is in fact in date format. I can convert it to CString from variant type, but don't know how to convert it to date format.