E
Eric Kaplan
I tried to get the DATETIME data type from SQL Server using ADO in
VC++.
The DATETIME value shown in SQLServer is
3/20/2008 2:00:00 AM
But when I look at the vtValue object in VC++ debugger it looks
something like:
tagVARIANT DATE = 39527.083333333336
vt 7 unsigned short
DATE 39527.083333333336 double
How can I modify the following code to get the correct DATEIMTE?
=========================
_variant_t vtValue;
vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
FieldValue=vtValue.date;
=========================
bool Table::Get(char* FieldName,int& FieldValue)
{
_variant_t vtValue;
vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
FieldValue=vtValue.date;
return 1;
}
VC++.
The DATETIME value shown in SQLServer is
3/20/2008 2:00:00 AM
But when I look at the vtValue object in VC++ debugger it looks
something like:
tagVARIANT DATE = 39527.083333333336
vt 7 unsigned short
DATE 39527.083333333336 double
How can I modify the following code to get the correct DATEIMTE?
=========================
_variant_t vtValue;
vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
FieldValue=vtValue.date;
=========================
bool Table::Get(char* FieldName,int& FieldValue)
{
_variant_t vtValue;
vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
FieldValue=vtValue.date;
return 1;
}