Table of Contents

Interface IStdDateTimeModule

Namespace
RDCore.SDK.Runtime.Abstract.StdLib
Assembly
RDCore.SDK.dll

MS-VBAL 6.1.2.4 DateTime Module

public interface IStdDateTimeModule

Remarks

Formalizes the public interface of the standard library VBA.DateTime module.

Methods

StdDateTime__DateAdd(VBStringValue, VBDoubleValue, VBVariantValue)

MS-VBAL 6.1.2.4.1.1 DateAdd

RuntimeSemanticsEvaluationResult StdDateTime__DateAdd(VBStringValue interval, VBDoubleValue number, VBVariantValue date)

Parameters

interval VBStringValue

A string data value that specifies the interval of time to add.

number VBDoubleValue

The number of intervals to add. Can be positive (future) or negative (past). Rounded to the nearest whole number if not an integral numeric value.

date VBVariantValue

A date data value to which the interval is added.

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Returns the result of adding or subtracting a specified time interval from a base date.
The valid interval parameter values are defined in IStdDateTimeModule.StdDateIntervals.

StdDateTime__DateDiff(VBStringValue, VBVariantValue, VBVariantValue, VBDayOfWeek, VBFirstWeekOfYear)

MS-VBAL 6.1.2.4.1.2 DateDiff

RuntimeSemanticsEvaluationResult StdDateTime__DateDiff(VBStringValue interval, VBVariantValue date1, VBVariantValue date2, VBDayOfWeek firstDayOfWeek = VBDayOfWeek.VBSunday, VBFirstWeekOfYear firstWeekofYear = VBFirstWeekOfYear.VBFirstJan1)

Parameters

interval VBStringValue

A string data value that specifies the interval of time to use to calculate the difference between date1 and date2.

date1 VBVariantValue

The first date to use in the calculation.

date2 VBVariantValue

The second date to use in the calculation.

firstDayOfWeek VBDayOfWeek

A constant that specifies the first day of the week. This parameter is optional (default: VBSunday).

firstWeekofYear VBFirstWeekOfYear

A constant that specifies the first week of the year. This parameter is optional (default: VBFirstJan1).

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Returns the result of adding or subtracting a specified time interval from a base date.

StdDateTime__DatePart(VBStringValue, VBVariantValue, VBVariantValue, VBDayOfWeek, VBFirstWeekOfYear)

MS-VBAL 6.1.2.4.1.3 DatePart

RuntimeSemanticsEvaluationResult StdDateTime__DatePart(VBStringValue interval, VBVariantValue date1, VBVariantValue date2, VBDayOfWeek firstDayOfWeek = VBDayOfWeek.VBSunday, VBFirstWeekOfYear firstWeekofYear = VBFirstWeekOfYear.VBFirstJan1)

Parameters

interval VBStringValue

A string data value that specifies the interval of time to use to calculate the difference between date1 and date2.

date1 VBVariantValue

The first date to use in the calculation.

date2 VBVariantValue

The second date to use in the calculation.

firstDayOfWeek VBDayOfWeek

A constant that specifies the first day of the week. This parameter is optional (default: VBSunday).

firstWeekofYear VBFirstWeekOfYear

A constant that specifies the first week of the year. This parameter is optional (default: VBFirstJan1).

Returns

RuntimeSemanticsEvaluationResult

A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.

Remarks

Returns the result of adding or subtracting a specified time interval from a base date.

StdDateTime__DateSerial(VBIntegerValue, VBIntegerValue, VBIntegerValue)

MS-VBAL 6.1.2.4.1.4 DateSerial

RuntimeSemanticsEvaluationResult StdDateTime__DateSerial(VBIntegerValue year, VBIntegerValue month, VBIntegerValue day)

Parameters

year VBIntegerValue

A VBIntegerValue representing the year of the date value.

month VBIntegerValue

A VBIntegerValue representing the month of the date value.

day VBIntegerValue

A VBIntegerValue representing the day of the date value.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBDateValue from a specified year, month, and day.

StdDateTime__DateValue(VBVariantValue)

MS-VBAL 6.1.2.4.1.5 DateValue

RuntimeSemanticsEvaluationResult StdDateTime__DateValue(VBVariantValue date)

Parameters

date VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBDateValue from a specified VBStringValue.

StdDateTime__Day(VBVariantValue)

MS-VBAL 6.1.2.4.1.6 Day

RuntimeSemanticsEvaluationResult StdDateTime__Day(VBVariantValue date)

Parameters

date VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue/VBIntegerValue representing the day of the month.

StdDateTime__Hour(VBVariantValue)

MS-VBAL 6.1.2.4.1.7 Hour

RuntimeSemanticsEvaluationResult StdDateTime__Hour(VBVariantValue time)

Parameters

time VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue/VBIntegerValue between 0 and 23 representing the hour of the day.

StdDateTime__Minute(VBVariantValue)

MS-VBAL 6.1.2.4.1.8 Minute

RuntimeSemanticsEvaluationResult StdDateTime__Minute(VBVariantValue time)

Parameters

time VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue/VBIntegerValue between 0 and 59 representing the minute of the hour.

StdDateTime__Month(VBVariantValue)

MS-VBAL 6.1.2.4.1.9 Month

RuntimeSemanticsEvaluationResult StdDateTime__Month(VBVariantValue date)

Parameters

date VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue/VBIntegerValue between 1 and 12 representing the month of the year.

StdDateTime__Second(VBVariantValue)

MS-VBAL 6.1.2.4.1.10 Second

RuntimeSemanticsEvaluationResult StdDateTime__Second(VBVariantValue time)

Parameters

time VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue/VBIntegerValue between 0 and 59 representing the second of the minute.

StdDateTime__TimeSerial(VBIntegerValue, VBIntegerValue, VBIntegerValue)

MS-VBAL 6.1.2.4.1.11 TimeSerial

RuntimeSemanticsEvaluationResult StdDateTime__TimeSerial(VBIntegerValue hour, VBIntegerValue minute, VBIntegerValue second)

Parameters

hour VBIntegerValue

An integer between 0 and 23 representing the hour of the day.

minute VBIntegerValue

An integer between 0 and 59 representing the minute of the hour.

second VBIntegerValue

An integer between 0 and 59 representing the second of the minute.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue holding a date containing the time for a specific hour, minute, and second.

StdDateTime__TimeValue(VBStringValue)

MS-VBAL 6.1.2.4.1.12 TimeValue

RuntimeSemanticsEvaluationResult StdDateTime__TimeValue(VBStringValue time)

Parameters

time VBStringValue

A time value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue (VBDateValue) truncated of its date portion.

StdDateTime__WeekDay(VBVariantValue, VBDayOfWeek)

MS-VBAL 6.1.2.4.1.13 WeekDay

RuntimeSemanticsEvaluationResult StdDateTime__WeekDay(VBVariantValue date, VBDayOfWeek firstDayOfWeek = VBDayOfWeek.VBSunday)

Parameters

date VBVariantValue

A value that is let-coercibleto a VBDateValue.

firstDayOfWeek VBDayOfWeek

A constant that specifies the first day of the week. This parameter is optional (default: VBSunday).

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns an VBVariantValue (VBIntegerValue) representing the day of the week of a specified VBDateValue.

StdDateTime__Year(VBVariantValue)

MS-VBAL 6.1.2.4.1.14 Year

RuntimeSemanticsEvaluationResult StdDateTime__Year(VBVariantValue date)

Parameters

date VBVariantValue

A value that is let-coercible to a VBDateValue, holding a date value to be represented.

Returns

RuntimeSemanticsEvaluationResult

Remarks

Returns a VBVariantValue/VBIntegerValue representing the year.

StdDateTime__getCalendar()

MS-VBAL 6.1.2.4.2.1 Calendar

RuntimeSemanticsEvaluationResult StdDateTime__getCalendar()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets or sets the VBCalendar to use for subsequent calls to VBA.DateTime module functions.

StdDateTime__getDate()

MS-VBAL 6.1.2.4.2.2 Date

RuntimeSemanticsEvaluationResult StdDateTime__getDate()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets a VBVariantValue (VBDateValue) holding the current system date.

StdDateTime__getDateStr()

MS-VBAL 6.1.2.4.2.2 Date$

RuntimeSemanticsEvaluationResult StdDateTime__getDateStr()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets a VBStringValue holding a string representation of the current system date.

StdDateTime__getNow()

MS-VBAL 6.1.2.4.2.3 Now

RuntimeSemanticsEvaluationResult StdDateTime__getNow()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets a VBDateValue holding the current system date and time.

StdDateTime__getTime()

MS-VBAL 6.1.2.4.2.4 Time

RuntimeSemanticsEvaluationResult StdDateTime__getTime()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets a VBVariantValue (VBDateValue) holding the current system time.

StdDateTime__getTimeStr()

MS-VBAL 6.1.2.4.2.4 Time$

RuntimeSemanticsEvaluationResult StdDateTime__getTimeStr()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets a VBStringValue holding a string representation of the current system time.

StdDateTime__getTimer()

MS-VBAL 6.1.2.4.2.5 Timer

RuntimeSemanticsEvaluationResult StdDateTime__getTimer()

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets a VBSingleValue representing the number of seconds elapsed since midnight.
👉 The sub-second resolution is implementation-dependant; MS-VBAL resolution measures ticks (15ms).

StdDateTime__setCalendar(VBCalendar)

MS-VBAL 6.1.2.4.2.1 Calendar

RuntimeSemanticsEvaluationResult StdDateTime__setCalendar(VBCalendar value)

Parameters

value VBCalendar

Returns

RuntimeSemanticsEvaluationResult

Remarks

Gets or sets the VBCalendar to use for subsequent calls to VBA.DateTime module functions.