Help Center
Help CenterAfxNovaDateTime

COleDateTime Class

Members (41)

CAST OperatorReturns the **COleDateTime** value as a long integer.ConstructorsCreate new **COleDateTime** objects initialized to the specified value.FormatConverts a **COleDateTime** object to a string.FormatConverts a **COleDateTime** object to a string.FormatConverts a **COleDateTime** object to a string.GetAsDBTIMESTAMPReturns the date/time the of this **COleDateTime** object as a **DBTIMESTAMP** data structure.GetAsSystemTimeReturns the date/time the of this **COleDateTime** object as a **SYSTEMTIME** data structure.GetAsUdateReturns the date/time the of this **COleDateTime** object as a UDATE structure.GetCurrentTimeReturns the current date/time value in local time.GetDayGets the day represented by this date/time value.GetDayOfWeekGets the day of the week represented by this date/time value.GetDayOfYearGets the day of the year represented by this date/time value.GetHourGets the hour represented by this date/time value.GetLocalTimeReturns the current date/time value in local time.GetMinuteGets the minute represented by this date/time value.GetMonthGets the month represented by this date/time value.GetSecondGets the second represented by this date/time value.GetStatusGets the status (validity) of a given **COleDateTime** object.GetSystemTimeReturns the current date/time value in Coordinated Universal Time (UTC).GetYearGets the year represented by this date/time value.LET OperatorAssigns a value to a **COleDateTime** object.OperatorsAdds, subtracts or compares **COleDateTime** objects.SetDateSets the date of this **COleDateTime** object.SetDateTimeSets the date and time of this **COleDateTime** object.SetStatusSets the status (validity) of a given **COleDateTime** object.SetTimeSets the time of this **COleDateTime** object.CAST OperatorReturns the **COleDateTimeSpan** value as a long integer.ConstructorsCreate new **COleDateTimeSpan** objects initialized to the specified value.GetDaysRetrieves the day portion of this date/time-span value.GetHoursRetrieves the hour portion of this date/time-span value.GetMinutesRetrieves the minutes portion of this date/time-span value.GetSecondsRetrieves the seconds portion of this date/time-span value.GetStatusGets the status (validity) of a given **COleDateTimeSpan** object.GetTotalDaysRetrieves this date/time-span value expressed in days.GetTotalHoursRetrieves this date/time-span value expressed in hours.GetTotalMinutesRetrieves this date/time-span value expressed in minutes.GetTotalSecondsRetrieves this date/time-span value expressed in seconds.LET OperatorAssigns a value to a **COleDateTimeSpan** object.OperatorsAdds, subtracts or compares **COleDateTimeSpan** objects.SetDateTimeSpanSets the date and time of this **COleDateTimeSpan** object.SetStatusSets the status (validity) of a given **COleDateTimeSpan** object.

Documentation

COleDateTime Class

Encapsulates the DATE data type that is used in OLE automation.

It is one of the possible types for the VARIANT data type of OLE automation. A COleDateTime value represents an absolute date and time value. The DATE type is implemented as a floating-point value. Days are measured from December 30, 1899, at midnight. The COleDateTime class handles dates from January 1, 100, through December 31, 9999. The COleDateTime class uses the Gregorian calendar; it does not support Julian dates. COleDateTime ignores Daylight Saving Time. This type is also used to represent date-only or time-only values. By convention, the date 0 (December 30, 1899) is used for time-only values and the time 00:00 (midnight) is used for date-only values.

Caution: Note that although day values become negative before midnight on December 30, 1899, time-of-day values do not. For example, 6:00 AM is always represented by a fractional value 0.25 regardless of whether the integer representing the day is positive (after December 30, 1899) or negative (before December 30, 1899). This means that a simple floating point comparison would erroneously sort a COleDateTime representing 6:00 AM on 12/29/1899 as later than one representing 7:00 AM on the same day.

Include file: Afx/COleDateTime.inc

NameDescription
ConstructorsCreate new COleDateTime objects initialized to the specified value.
CAST OperatorReturns the COleDateTime value as a long integer.
LET OperatorAssigns a value to a COleDateTime object.
OperatorsAdds, subtracts or compares COleDateTime objects.
FormatConverts a COleDateTime object to a string.
Format (Overload)Converts a COleDateTime object to a string.
GetAsDBTIMESTAMPReturns the date/time the of this COleDateTime object as a DBTIMESTAMP data structure.
GetAsSystemTimeReturns the date/time the of this COleDateTime object as a SYSTEMTIME data structure.
GetAsUdateReturns the date/time the of this COleDateTime object as a UDATE structure.
GetCurrentTimeReturns the current date/time value in local time.
GetDayGets the day represented by this date/time value.
GetDayOfWeekGets the day of the week represented by this date/time value.
GetDayOfYearGets the day of the year represented by this date/time value.
GetHourGets the hour represented by this date/time value.
GetLocalTimeReturns the current date/time value in local time.
GetMinuteGets the minute represented by this date/time value.
GetMonthGets the month represented by this date/time value.
GetSecondGets the second represented by this date/time value.
GetStatusGets the status (validity) of a given COleDateTime object.
GetSystemTimeReturns the current date/time value in Coordinated Universal Time (UTC).
GetYearGets the year represented by this date/time value.
SetDateSets the date of this COleDateTime object.
SetDateTimeSets the date and time of this COleDateTime object.
SetStatusSets the status (validity) of a given COleDateTime object.
SetTimeSets the time of this COleDateTime object.

COleDateTimeSpan Class

NameDescription
ConstructorsCreate new COleDateTimeSpan objects initialized to the specified value.
CAST OperatorReturns the COleDateTimeSpan value as a long integer.
LET OperatorAssigns a value to a COleDateTimeSpan object.
OperatorsAdds, subtracts or compares COleDateTimeSpan objects.
GetDaysRetrieves the day portion of this date/time-span value.
GetHoursRetrieves the hour portion of this date/time-span value.
GetMinutesRetrieves the minutes portion of this date/time-span value.
GetSecondsRetrieves the seconds portion of this date/time-span value.
GetStatusGets the status (validity) of a given COleDateTimeSpan object.
GetTotalDaysRetrieves this date/time-span value expressed in days.
GetTotalHoursRetrieves this date/time-span value expressed in hours.
GetTotalMinutesRetrieves this date/time-span value expressed in minutes.
GetTotalSecondsRetrieves this date/time-span value expressed in seconds.
SetDateTimeSpanSets the date and time of this COleDateTimeSpan object.
SetStatusSets the status (validity) of a given COleDateTimeSpan object.

Constructors (COleDateTime)

Create new COleDateTime objects initialized to the specified value.

CONSTRUCTOR COleDateTime
CONSTRUCTOR COleDateTime (BYREF dateSrc AS COleDateTime)
CONSTRUCTOR COleDateTime (BYREF varSrc AS VARIANT)
CONSTRUCTOR COleDateTime (BYVAL dtSrc AS DATE_)
CONSTRUCTOR COleDateTime (BYVAL timeSrc AS LONGLONG)
CONSTRUCTOR COleDateTime (BYREF systimeSrc AS SYSTEMTIME)
CONSTRUCTOR COleDateTime (BYREF filetimeSrc AS FILETIME)
CONSTRUCTOR COleDateTime (BYVAL wDosDate AS DWORD, BYVAL wDosTime AS WORD)
CONSTRUCTOR COleDateTime (BYREF dbts AS DBTIMESTAMP)
CONSTRUCTOR COleDateTime (BYREF ud AS UDATE)
CONSTRUCTOR COleDateTime (BYVAL nYear AS WORD, BYVAL nMonth AS WORD, BYVAL nDay AS WORD, _
   BYVAL nHour AS WORD, BYVAL nMin AS WORD, BYVAL nSec AS WORD)
CONSTRUCTOR COleDateTime (BYREF wsz AS WSTRING, BYVAL dwFlags AS DWORD = 0, _
   BYVAL lcid AS LCID = LANG_USER_DEFAULT)
ParameterDescription
dateSrcAn existing COleDateTime object to be copied into the new COleDateTime object.
varSrcAn existing VARIANT data structure to be converted to a date/time value (VT_DATE) and copied into the new COleDateTime object.
dtSrcA date/time ( DATE) value to be copied into the new COleDateTime object.
timeSrcA LongInt value to be converted to a date/time value and copied into the new COleDateTime object.
systimeSrcA SYSTEMTIME structure to be converted to a date/time value and copied into the new COleDateTime object.
filetimeSrcA FILETIME structure to be converted to a date/time value and copied into the new COleDateTime object. Note that FILETIME uses Universal Coordinated Time (UTC), so if you pass a local time in the structure, your results will be incorrect. See File Times in the Windows SDK for more information.
nYear / nMonth / nDay / nHour / nMin / nSecIndicate the date and time values to be copied into the new COleDateTime object.
wDosDate / wDosTimeMS-DOS date and time values to be converted to a date/time value and copied into the new COleDateTime object.
dbtsA reference to a DBTimeStamp structure containing the current local time.
udThe UDATE value is converted and copied into this COleDateTime object. If the conversion is successful, the status of this object is set to valid; if unsuccessful, it is set to invalid. A UDATE structure represents an "unpacked" date. See the function VarDateFromUdate for more details.
wszA null-terminated unicode string which is to be parsed. This parameter can take a variety of formats. For example, the following strings contain acceptable date/time formats:
"25 January 1996"
"8:30:00"
"20:30:00"
"January 25, 1996 8:30:00"
"8:30:00 Jan. 25, 1996"
"1/25/1996 8:30:00" // always specify the full year, even in a 'short date' format.
Note that the locale ID will also affect whether the string format is acceptable for conversion to a date/time value. In the case of VAR_DATEVALUEONLY, the time value is set to time 0, or midnight. In the case of VAR_TIMEVALUEONLY, the date value is set to date 0, meaning 30 December 1899.
dwFlagsIndicates flags for locale settings and parsing.
LOCALE_NOUSEROVERRIDE Use the system default locale settings, rather than custom user settings.
VAR_TIMEVALUEONLY Ignore the date portion during parsing.
VAR_DATEVALUEONLY Ignore the time portion during parsing.
lcidIndicates locale ID to use for the conversion. Default value: LANG_USER_DEFAULT.
Remarks

The status of the new COleDateTime object is set to valid.


CAST Operator (COleDateTime)

Returns the underlying DATE value from this COleDateTime object.

OPERATOR CAST () AS DATE_

LET Operator (=) (COleDateTime)

Assigns a value to a COleDateTime object.

OPERATOR LET (BYREF dateSrc AS COleDateTime)
OPERATOR LET (BYREF varSrc AS VARIANT)
OPERATOR LET (BYVAL dtSrc AS DATE_)
OPERATOR LET (BYVAL timeSrc AS LONGLONG)
OPERATOR LET (BYREF systimeSrc AS SYSTEMTIME)
OPERATOR LET (BYREF filetimeSrc AS FILETIME)
OPERATOR LET (BYREF dbts AS DBTIMESTAMP)
OPERATOR LET (BYREF ud AS UDATE)
OPERATOR LET (BYREF wsz AS WSTRING)
ParameterDescription
dateSrcAn existing COleDateTime object to be copied into the new COleDateTime object.
varSrcAn existing VARIANT data structure to be converted to a date/time value (VT_DATE) and copied into the new COleDateTime object.
dtSrcA date/time ( DATE) value to be copied into the new COleDateTime object.
timeSrcA LongInt value to be converted to a date/time value and copied into the new COleDateTime object.
systimeSrcA SYSTEMTIME structure to be converted to a date/time value and copied into the new COleDateTime object.
filetimeSrcA FILETIME structure to be converted to a date/time value and copied into the new COleDateTime object. Note that FILETIME uses Universal Coordinated Time (UTC), so if you pass a local time in the structure, your results will be incorrect. See File Times in the Windows SDK for more information.
dbtsA reference to a DBTimeStamp structure containing the current local time.
udThe UDATE value is converted and copied into this COleDateTime object. If the conversion is successful, the status of this object is set to valid; if unsuccessful, it is set to invalid. A UDATE structure represents an "unpacked" date. See the function VarDateFromUdate for more details.
wszA null-terminated unicode string which is to be parsed. This parameter can take a variety of formats. For example, the following strings contain acceptable date/time formats:
"25 January 1996"
"8:30:00"
"20:30:00"
"January 25, 1996 8:30:00"
"8:30:00 Jan. 25, 1996"
"1/25/1996 8:30:00" // always specify the full year, even in a 'short date' format.
Note that the locale ID will also affect whether the string format is acceptable for conversion to a date/time value. In the case of VAR_DATEVALUEONLY, the time value is set to time 0, or midnight. In the case of VAR_TIMEVALUEONLY, the date value is set to date 0, meaning 30 December 1899.

Operators (COleDateTime)

Adds, subtracts or compares COleDateTime objects.

OPERATOR + (BYREF dt AS COleDateTime, BYREF dateSpan AS COleDateTimeSpan) AS COleDateTime
OPERATOR - (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS COleDateTimeSpan
OPERATOR - (BYREF dt AS COleDateTime, BYREF dateSpan AS COleDateTimeSpan) AS COleDateTime
OPERATOR += (BYREF dateSpan AS COleDateTimeSpan)
OPERATOR -= (BYREF dateSpan AS COleDateTimeSpan)
OPERATOR = (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS BOOLEAN
OPERATOR <> (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS BOOLEAN
OPERATOR < (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS BOOLEAN
OPERATOR > (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS BOOLEAN
OPERATOR <= (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS BOOLEAN
OPERATOR >= (BYREF dt1 AS COleDateTime, BYREF dt2 AS COleDateTime) AS BOOLEAN

Format (COleDateTime)

Converts a COleDateTime to a formatted string.

FUNCTION Format (BYREF wszFmt AS WSTRING) AS DWSTRING
ParameterDescription
wszFmtA format string which contains special formatting codes that are preceded by a percent sign (%).

Formatting codes:

CodeMeaning
%aAbbreviated weekday name
%AFull weekday name
%bAbbreviated month name
%BFull month name
%cDate and time representation appropriate for locale
%dDay of month as decimal number (01 – 31)
%HHour in 24-hour format (00 – 23)
%IHour in 12-hour format (01 – 12)
%jDay of year as decimal number (001 – 366)
%mMonth as decimal number (01 – 12)
%MMinute as decimal number (00 – 59)
%pCurrent locale's A.M./P.M. indicator for 12-hour clock
%SSecond as decimal number (00 – 59)
%UWeek of year as decimal number, with Sunday as first day of week (00 – 53)
%wWeekday as decimal number (0 – 6; Sunday is 0)
%WWeek of year as decimal number, with Monday as first day of week (00 – 53)
%xDate representation for current locale
%XTime representation for current locale
%yYear without century, as decimal number (00 – 99)
%YYear with century, as decimal number
%z, %ZEither the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown
%%Percent sign

The # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows.

  • %#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#%: # flag is ignored.
  • %#c: Long date and time representation, appropriate for current locale. For example: "Tuesday, March 14, 1995, 12:41:29".
  • %#x* Long date representation, appropriate to current locale. For example: "Tuesday, March 14, 1995".
  • %#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y: Remove leading zeros (if any).

Format (Overload) (COleDateTime)

Converts a COleDateTime to a formatted string.

FUNCTION Format (BYVAL dwFlags AS DWORD = 0, BYVAL lcid AS LCID = LANG_USER_DEFAULT) AS DWSTRING
ParameterDescription
dwFlagsOne or more of the following flags.
lcidThe locale identifier. Default value: LANG_USER_DEFAULT.
FlagMeaning
LOCALE_NOUSEROVERRIDEUses the system default locale settings, rather than custom locale settings.
VAR_CALENDAR_HIJRIIf set then the Hijri calendar is used. Otherwise the calendar set in the control panel is used.
VAR_CALENDAR_THAIIf set then the Buddhist year is used.
VAR_CALENDAR_GREGORIANIf set the Gregorian year is used.
VAR_FOURDIGITYEARSUse 4-digit years instead of 2-digit years.
VAR_TIMEVALUEONLYOmits the date portion of a VT_DATE and returns only the time. Applies to conversions to or from dates.
VAR_DATEVALUEONLYOmits the time portion of a VT_DATE and returns only the date. Applies to conversions to or from dates.
Return value

The COleDateTime as a formatted string.


GetAsDBTIMESTAMP (COleDateTime)

Returns the date/time the of this COleDateTime object as a DBTIMESTAMP data structure.

FUNCTION GetAsDBTIMESTAMP (BYREF dbts AS DBTIMESTAMP) AS BOOLEAN
ParameterDescription
dbtsA reference to a DBTIMESTAMP structure to receive the converted date/time value from the COleDateTime object.
Return value

TRUE or FALSE.


GetAsSystemTime (COleDateTime)

Returns the date/time the of this COleDateTime object as a SYSTEMTIME data structure.

FUNCTION GetAsSystemTime (BYREF sysTime AS SYSTEMTIME) AS BOOLEAN
ParameterDescription
sysTimeA reference to a SYSTEMTIME structure to receive the converted date/time value from the COleDateTime object.
Return value

TRUE or FALSE.


GetAsUdate (COleDateTime)

Returns the date/time the of this COleDateTime object as a UDATE structure.

FUNCTION GetAsUdate (BYREF ud AS UDATE) AS BOOLEAN
Return value

TRUE or FALSE.


GetCurrentTime (COleDateTime)

Returns the current date/time value in local time.

FUNCTION GetCurrentTime () AS COleDateTime
Return value

The current date/time as a COleDateTime.

Example
DIM ct AS COleDateTime = COleDateTime().GetCurrentTime()

--or--

DIM ct AS COleDateTime
ct = ct.GetCurrentTime()

GetDay (COleDateTime)

Returns the day represented by this date/time value. Valid return values range between 1 and 31.

FUNCTION GetDay () AS WORD

GetDayOfWeek (COleDateTime)

Returns the day of the week represented by this date/time value. Valid return values range between 1 and 7, where 1=Sunday, 2=Monday, and so on.

FUNCTION GetDayOfWeek () AS WORD

GetDayOfYear (COleDateTime)

Returns the day of the year represented by this date/time value. Valid return values range between 1 and 366, where January 1 = 1.

FUNCTION GetDayOfYear () AS WORD

GetHour (COleDateTime)

Returns the hour represented by this date/time value. Valid return values range between 0 and 23.

FUNCTION GetHour () AS WORD

GetLocalTime (COleDateTime)

Returns the current date/time value in local time.

FUNCTION GetLocalTime () AS COleDateTime

GetMinute (COleDateTime)

Returns the minute represented by this date/time value. Valid return values range between 0 and 59.

FUNCTION GetMinute () AS WORD

GetMonth (COleDateTime)

Returns the month represented by this date/time value. Valid return values range between 1 and 12.

FUNCTION GetMonth () AS WORD

GetSecond (COleDateTime)

Returns the second represented by this date/time value. Valid return values range between 0 and 59.

FUNCTION GetSecond () AS WORD

GetStatus (COleDateTime)

Gets the status (validity) of a given COleDateTime object.

FUNCTION GetStatus () AS BOOLEAN

GetSystemTime (COleDateTime)

Returns the current date/time value in Coordinated Universal Time (UTC).

FUNCTION GetSystemTime () AS COleDateTime

GetYear (COleDateTime)

Returns the year represented by this date/time value. Valid return values range between 100 and 9999, which includes the century.

FUNCTION GetYear () AS WORD

SetDate (COleDateTime)

Sets the date of this COleDateTime object.

FUNCTION SetDate (BYVAL nYear AS WORD, BYVAL nMonth AS WORD, BYVAL nDay AS WORD)
ParameterDescription
nYear / nMonth / nDayIndicates the date values to be copied into the COleDateTime object.

SetDateTime (COleDateTime)

Sets the date and time of this COleDateTime object.

FUNCTION SetDateTime (BYVAL nYear AS WORD, BYVAL nMonth AS WORD, BYVAL nDay AS WORD, _
   BYVAL nHour AS WORD, BYVAL nMin AS WORD, BYVAL nSec AS WORD)
ParameterDescription
nYear / nMonth / nDay / nHour / nMin / nSecIndicates the date and time values to be copied into the COleDateTime object.

SetStatus (COleDateTime)

Sets the status (validity) of a given COleDateTime object.

FUNCTION SetStatus (BYVAL nStatus AS BOOLEAN)
ParameterDescription
nStatusTRUE or FALSE.

SetTime (COleDateTime)

Sets the time of this COleDateTime object.

FUNCTION SetTime (BYVAL nHour AS WORD, BYVAL nMin AS WORD, BYVAL nSec AS WORD)
ParameterDescription
nHour / nMin / nSecIndicates the time values to be copied into the COleDateTime object.

Constructors (COleDateTimeSpan)

All these constructors create new COleDateTimeSpan objects initialized to the specified value.

CONSTRUCTOR COleDateTimeSpan
CONSTRUCTOR COleDateTimeSpan (dblSpanSrc AS DOUBLE)
CONSTRUCTOR COleDateTimeSpan (BYVAL lDays AS LONG, BYVAL nHours AS LONG, BYVAL nMins AS LONG, BYVAL nSecs AS LONG)
ParameterDescription
dblSpanSrcThe number of days to be copied into the new COleDateTimeSpan object.
lDays / nHours / nMins / nSecsIndicates the day and time values to be copied into the new COleDateTimeSpan object.
Remarks

The status of the new COleDateTimeSpan object is set to valid.


CAST Operator (COleDateTimeSpan)

Returns the underlying DATE value from this COleDateTimeSpan object.

OPERATOR CAST () AS DOUBLE

LET Operator (=) (COleDateTimeSpan)

Assigns a value to a COleDateTimeSpan object.

OPERATOR LET (BYVAL dblSpanSrc AS DOUBLE)
ParameterDescription
dblSpanSrcThe number of days to be copied into the COleDateTimeSpan object.

Operators (COleDateTimeSpan)

Adds, subtracts or compares COleDateTimeSpan objects.

OPERATOR + (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS COleDateTimeSpan
OPERATOR - (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS COleDateTimeSpan
OPERATOR - (BYREF dateSpan AS COleDateTimeSpan) AS COleDateTimeSpan
OPERATOR += (BYREF dateSpan AS COleDateTimeSpan)
OPERATOR -= (BYREF dateSpan AS COleDateTimeSpan)
OPERATOR = (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS BOOLEAN
OPERATOR <> (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSPan2 AS COleDateTimeSpan) AS BOOLEAN
OPERATOR < (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS BOOLEAN
OPERATOR > (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS BOOLEAN
OPERATOR <= (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS BOOLEAN
OPERATOR >= (BYREF dateSpan1 AS COleDateTimeSpan, BYREF dateSpan2 AS COleDateTimeSpan) AS BOOLEAN

GetDays (COleDateTimeSpan)

Retrieves the day portion of this date/time-span value. The return values from this function range between approximately – 3,615,000 and 3,615,000.

FUNCTION GetDays () AS LONGINT

GetHours (COleDateTimeSpan)

Retrieves the hour portion of this date/time-span value. The return values from this function range between – 23 and 23.

FUNCTION GetHours () AS LONGINT

GetMinutes (COleDateTimeSpan)

Retrieves the minutes portion of this date/time-span value. The return values from this function range between – 59 and 59.

FUNCTION GetMinutes () AS LONGINT

GetSeconds (COleDateTimeSpan)

Retrieves the seconds portion of this date/time-span value. The return values from this function range between – 59 and 59.

FUNCTION GetSeconds () AS LONGINT

GetStatus (COleDateTimeSpan)

Gets the status (validity) of a given COleDateTimeSpan object.

FUNCTION GetStatus () AS BOOLEAN

GetTotalDays (COleDateTimeSpan)

Retrieves this date/time-span value expressed in days.

FUNCTION GetTotalDays () AS LONGINT

GetTotalHours (COleDateTimeSpan)

Retrieves this date/time-span value expressed in hours.

FUNCTION GetTotalHours () AS LONGINT

GetTotalMinutes (COleDateTimeSpan)

Retrieves this date/time-span value expressed in minutes.

FUNCTION GetTotalMinutes () AS LONGINT

GetTotalSeconds (COleDateTimeSpan)

Retrieves this date/time-span value expressed in seconds.

FUNCTION GetTotalSeconds () AS LONGINT

SetDateTimeSpan (COleDateTimeSpan)

Sets the date and time of this COleDateTimeSpan object.

FUNCTION SetDateTimeSpan (BYVAL lDays AS LONG, BYVAL nHours AS LONG, BYVAL nMins AS LONG, BYVAL nSecs AS LONG)
ParameterDescription
lDays / nHours / nMins / nSecsIndicates the day and time values to be copied into the COleDateTimeSpan object.
Remarks

The status of the new COleDateTimeSpan object is set to valid.


SetStatus (COleDateTimeSpan)

Sets the status (validity) of a given COleDateTimeSpan object.

FUNCTION SetStatus (BYVAL nStatus AS BOOLEAN)
ParameterDescription
nStatusTRUE or FALSE.