Share via


CTime::GetAsSystemTime

BOOL GetAsSystemTime( SYSTEMTIME& timeDest ) const;

Return Value

Nonzero if successful; otherwise 0.

Parameters

timeDest

A reference to a structure to be converted to a date/time value and copied into the new CTime object.

Remarks

Call this member function to convert the time information stored in the CTime object to a Win32–compatible structure. GetAsSystemTime stores the resulting time in the referenced timeDest object. The SYSTEMTIME data structure initialized by this function will have its wMilliseconds member set to zero.

Example

// Convert CTime to FILETIME
CTime time(CTime::GetCurrentTime());
SYSTEMTIME timeDest;
time.GetAsSystemTime(timeDest);
FILETIME fileTime;
::SystemTimeToFileTime(&timeDest, &fileTime);

CTime OverviewClass MembersHierarchy Chart