This document is archived and information here might be outdated.  Recommended version.


ITime2 Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IT > ITime2 Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (System)  

ITime2 Interface

Provides access to members that control the Time.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Name Description
Method Compare Compares this time to the other time. Returns -1 if this time's value is less, 1 if greater, and 0 otherwise.
Read/write property Day The time's gregorian day.
Read-only property DayOfWeek The day number of the week, starting with 1 for Sunday.
Read-only property DayOfYear The day number of the year, starting with 1 for the first day of the year.
Read/write property Hour The time's hour.
Read/write property Minute The time's minute.
Read/write property Month The time's gregorian month.
Read/write property Nanoseconds The time's nanoseconds.
Method QueryDayFraction The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method QueryGregorianTime Obtains the time as a gregorian date and time.
Method QueryIntegerTime Obtains the time as an integer time.
Method QueryJulianDayNumber The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.
Method QueryNanosecondsSinceMidnight The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method QueryOleTime Obtains the time as an OLE automation date object.
Method QueryTicks Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini).
Method QueryTimeString Obtains the time as a string, based on the given time string format.
Method QueryTimeStringCurrentLocale Obtains the time as a string, based on the current locale.
Method QueryTimeStringCustom Obtains the time as a string, based on the given custom time string format, and locale properties.
Method QueryXMLTimeString Obtains the time as an XML time string.
Read/write property Second The time's second.
Method SetDayFraction The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method SetFromCurrentLocalTime Writes the time to the current date and time on this machine, expressed as the local time.
Method SetFromCurrentUtcTime Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC).
Method SetFromGregorianTime Obtains the time from a given gregorian date and time value.
Method SetFromIntegerTime Writes the time from an integer time.
Method SetFromObject Writes the time from a variant object.
Method SetFromOleTime Writes the time from an OLE automation date object.
Method SetFromTicks Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value.
Method SetFromTimeString Writes the time from a string, based on the given time string format.
Method SetFromTimeStringCurrentLocale Obtains the time from a string, based on the current locale.
Method SetFromTimeStringCustom Writes the time from a string, based on the given custom time string formats, and locale properties.
Method SetFromXMLTimeString Writes the time from an XML time string.
Method SetJulianDayNumber The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.
Method SetNanosecondsSinceMidnight The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method SnapToEndOfMonth Adjust the day value, to the last day in the current month and year.
Method SubtractTime Subtracts a given time, and returns the time duration result.
Method ToLocal Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time.
Method ToUTC Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC).
Read-only property WeekOfMonth The week number of the month, starting with 1 for the first week of the month. Use startDayOfWeek=1 to specify that weeks start on Sunday, and 2 on Monday.
Read-only property WeekOfYear The week number of the year, starting with 1 for first week of the year. Use startDayOfWeek=1 to specify that weeks start on Sunday, and 2 on Monday.
Read/write property Year The time's gregorian year.

Inherited Interfaces

Interfaces Description
ITime Provides access to members that control the Time.

CoClasses that implement ITime2

CoClasses and Classes Description
Time An object that represents a date and time value.