This document is archived and information here might be outdated. Recommended version. |
Provides access to members that control the Time.
The ITime interface is used to access a scalar time value. There is no associated temporal reference, so there is no time zone or daylight savings time associated with the value. The ITime interface can be used to do simple conversions, such as setting a year, month and day, then getting querying for a Julian Day number. The ITime interface supports values with nanosecond accuracy. In general, setting individual values such as the year, month, and day can be problematic. for example, if the Month is set to 2 (February) when the day already has the value 31, this will cause an error because there is no February 31st. It would be better to set the month and day at the same time.
Name | Description | |
---|---|---|
Compare | Compares this time to the other time. Returns -1 if this time's value is less, 1 if greater, and 0 otherwise. | |
Day | The time's gregorian day. | |
Hour | The time's hour. | |
Minute | The time's minute. | |
Month | The time's gregorian month. | |
Nanoseconds | The time's nanoseconds. | |
QueryDayFraction | The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties. | |
QueryGregorianTime | Obtains the time as a gregorian date and time. | |
QueryIntegerTime | Obtains the time as an integer time. | |
QueryJulianDayNumber | The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties. | |
QueryNanosecondsSinceMidnight | The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties. | |
QueryOleTime | Obtains the time as an OLE automation date object. | |
QueryTicks | Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini). | |
QueryTimeString | Obtains the time as a string, based on the given time string format. | |
QueryTimeStringCurrentLocale | Obtains the time as a string, based on the current locale. | |
QueryTimeStringCustom | Obtains the time as a string, based on the given custom time string format, and locale properties. | |
QueryXMLTimeString | Obtains the time as an XML time string. | |
Second | The time's second. | |
SetDayFraction | The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties. | |
SetFromCurrentLocalTime | Writes the time to the current date and time on this machine, expressed as the local time. | |
SetFromCurrentUtcTime | Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC). | |
SetFromGregorianTime | Obtains the time from a given gregorian date and time value. | |
SetFromIntegerTime | Writes the time from an integer time. | |
SetFromObject | Writes the time from a variant object. | |
SetFromOleTime | Writes the time from an OLE automation date object. | |
SetFromTicks | Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value. | |
SetFromTimeString | Writes the time from a string, based on the given time string format. | |
SetFromTimeStringCurrentLocale | Obtains the time from a string, based on the current locale. | |
SetFromTimeStringCustom | Writes the time from a string, based on the given custom time string formats, and locale properties. | |
SetFromXMLTimeString | Writes the time from an XML time string. | |
SetJulianDayNumber | The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties. | |
SetNanosecondsSinceMidnight | The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties. | |
SnapToEndOfMonth | Adjust the day value, to the last day in the current month and year. | |
SubtractTime | Subtracts a given time, and returns the time duration result. | |
ToLocal | Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time. | |
ToUTC | Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC). | |
Year | The time's gregorian year. |
Classes | Description |
---|---|
Time | An object that represents a date and time value. |