Share via


CTime Members

Construction

CTime

Constructs CTime objects in various ways.

GetCurrentTime

Creates a CTime object that represents the current time (static member function).

Extraction

GetDay

Returns the day represent by the CTime object.

GetDayOfWeek

Returns the day of the week represented by the CTime object.

GetHour

Returns the hour represented by the CTime object.

GetMinute

Returns the minute represented by the CTime object.

GetMonth

Returns the month represented by the CTime object.

GetSecond

Returns the second represented by the CTime object.

GetTime

Returns a __time64_t value for the given CTime object.

GetYear

Returns the year represented by the CTime object.

Conversion

Format

Converts a CTime object into a formatted string — based on the local time zone.

FormatGmt

Converts a CTime object into a formatted string — based on UTC.

GetAsDBTIMESTAMP

Converts the time information stored in the CTime object to a Win32-compatible DBTimeStamp structure.

GetAsSystemTime

Converts the time information stored in the CTime object to a Win32-compatible SYSTEMTIME structure.

GetGmtTm

Breaks down a CTime object into components — based on UTC.

GetLocalTm

Breaks down a CTime object into components — based on the local time zone.

Operators

operator + –

These operators add and subtract CTimeSpan and CTime objects.

operator +=, –=

These operators add and subtract a CTimeSpan object to and from this CTime object.

operator =

The assignment operator.

operator ==, < , etc.

Comparison operators.

Archive

Serialize64

Serializes data to or from an archive.

See Also

Reference

CTime Class

CTimeSpan Class

Hierarchy Chart