Compartir a través de


CTime::GetAsDBTIMESTAMP

Nota

This method is only available when OLEDB.h is included.

Call this member function to convert the time information stored in the CTime object to a Win32–compatible DBTimeStamp structure.

bool GetAsDBTIMESTAMP(
   DBTIMESTAMP& dbts
) const throw( );

Parameters

  • dbts
    A reference to a DBTimeStamp structure containing the current local time.

Return Value

Nonzero if successful; otherwise 0.

Remarks

Stores the resulting time in the referenced dbts structure. The DBTIMESTAMP data structure initialized by this function will have its fraction member set to zero.

Example

CTime t = CTime::GetCurrentTime();
DBTIMESTAMP ts;
t.GetAsDBTIMESTAMP(ts); // Retrieves the time in t into the ts structure

Requirements

Header: atltime.h

See Also

Reference

CTime Class

Hierarchy Chart

Other Resources

CTime Members