Harbour OLE converts a Harbour date into a Variant Date automatically, in Harbour/contrib/hbwin/olecore.c there is:
- Code: Select all Expand view
/* Item <-> Variant conversion */
static void hb_oleItemToVariantRef( VARIANT * pVariant, PHB_ITEM pItem,
VARIANT * pVarRef, HB_OLEOBJ_FUNC pObjFunc
...
case HB_IT_DATE:
V_VT( pVariant ) = VT_DATE;
V_R8( pVariant ) = ( double ) ( hb_itemGetDL( pItem ) - HB_OLE_DATE_BASE );
if( pVarRef )
{
V_VT( pVarRef ) = VT_DATE | VT_BYREF;
V_R8REF( pVarRef ) = &V_R8( pVariant );
}
break;
So if we place a trace there, we could check the conversion. i.e. MessageBox( 0, "date to ole_date", "ok", 0 ); after VT_DATE assignment.
Richard, remember the small example that I posted here ? can I assign this property from it ? thanks (so I check the assignment here)