Share via


COleDateTime Members

Construction

COleDateTime

Constructs a COleDateTime object.

GetCurrentTime

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

Attributes

GetAsSystemTime

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

GetAsDBTIMESTAMP

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

GetAsUDATE

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

GetDay

Returns the day this COleDateTime object represents (1 – 31).

GetDayOfWeek

Returns the day of the week this COleDateTime object represents (Sunday = 1).

GetDayOfYear

Returns the day of the year this COleDateTime object represents (Jan 1 = 1).

GetHour

Returns the hour this COleDateTime object represents (0 – 23).

GetMinute

Returns the minute this COleDateTime object represents (0 – 59).

GetMonth

Returns the month this COleDateTime object represents (1 – 12).

GetSecond

Returns the second this COleDateTime object represents (0 – 59).

GetStatus

Gets the status (validity) of this COleDateTime object.

GetYear

Returns the year this COleDateTime object represents.

SetStatus

Sets the status (validity) of this COleDateTime object.

Operations

Format

Generates a formatted string representation of a COleDateTime object.

ParseDateTime

Reads a date/time value from a string and sets the value of COleDateTime.

SetDate

Sets the value of this COleDateTime object to the specified date-only value.

SetDateTime

Sets the value of this COleDateTime object to the specified date/time value.

SetTime

Sets the value of this COleDateTime object to the specified time-only value.

Operators

operator +, -

Add and subtract COleDateTime values.

operator +=, -=

Add and subtract a ColeDateTime value from this COleDateTime object.

operator =

Copies a COleDateTime value.

operator ==, <, <=, etc.

Compare two ColeDateTime values.

operator DATE*

Converts a ColeDateTime value into a DATE*.

operator DATE

Converts a ColeDateTime value into a DATE.

Data Members

m_dt

Contains the underlying DATE for this COleDateTime object.

m_status

Contains the status of this COleDateTime object.

See Also

Reference

COleDateTime Class

Hierarchy Chart