This documentation is archived and is not being maintained.

COleDateTime::GetAsDBTIMESTAMP 

Call this method to obtain the time in the COleDateTime object as a DBTIMESTAMP data structure.


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

Parameters

dbts

A reference to a DBTIMESTAMP structure.

Nonzero if successful; otherwise 0.

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.

// GetAsDBTIMESTAMP Example
#include "oledb.h"
#include "ATLComTime.h"
int main()
{
   COleDateTime t = COleDateTime::GetCurrentTime();
   DBTIMESTAMP ts;
   t.GetAsDBTIMESTAMP( ts ); // retrieves the time in t into the ts structure
}
Show: