Interface ITime

Namespace
ESRI.ArcGIS.esriSystem
Assembly
ESRI.Server.System.dll

Provides access to members that control the Time.

[Guid("66810D21-8DE0-44EE-B26E-465AC09F161F")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITime

Properties

Day

The time's gregorian day.

short Day { get; set; }

Property Value

short

Hour

The time's hour.

short Hour { get; set; }

Property Value

short

Minute

The time's minute.

short Minute { get; set; }

Property Value

short

Month

The time's gregorian month.

short Month { get; set; }

Property Value

short

Nanoseconds

The time's nanoseconds.

int Nanoseconds { get; set; }

Property Value

int

Second

The time's second.

short Second { get; set; }

Property Value

short

Year

The time's gregorian year.

short Year { get; set; }

Property Value

short

Methods

Compare(ITime)

Compares this time to the other time. Returns -1 if this time's value is less, 1 if greater, and 0 otherwise.

int Compare(ITime otherTime)

Parameters

otherTime ITime

Returns

int

QueryDayFraction()

The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

double QueryDayFraction()

Returns

double

QueryGregorianTime()

Obtains the time as a gregorian date and time.

WKSDateTime QueryGregorianTime()

Returns

WKSDateTime

QueryIntegerTime(esriIntegerTimeFormat)

Obtains the time as an integer time.

long QueryIntegerTime(esriIntegerTimeFormat integerTimeFormat)

Parameters

integerTimeFormat esriIntegerTimeFormat

Returns

long

QueryJulianDayNumber()

The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.

int QueryJulianDayNumber()

Returns

int

QueryNanosecondsSinceMidnight()

The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

long QueryNanosecondsSinceMidnight()

Returns

long

QueryOleTime()

Obtains the time as an OLE automation date object.

DateTime QueryOleTime()

Returns

DateTime

QueryTicks()

Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini).

long QueryTicks()

Returns

long

QueryTimeString(esriTimeStringFormat)

Obtains the time as a string, based on the given time string format.

string QueryTimeString(esriTimeStringFormat timeStringFormat)

Parameters

timeStringFormat esriTimeStringFormat

Returns

string

QueryTimeStringCurrentLocale(esriTimeLocaleFormat)

Obtains the time as a string, based on the current locale.

string QueryTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat)

Parameters

timeLocaleFormat esriTimeLocaleFormat

Returns

string

QueryTimeStringCustom(string, int, string, string)

Obtains the time as a string, based on the given custom time string format, and locale properties.

string QueryTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol)

Parameters

timeStringFormat string
LocaleID int
amSymbol string
pmSymbol string

Returns

string

QueryXMLTimeString(ITimeReference)

Obtains the time as an XML time string.

string QueryXMLTimeString(ITimeReference TimeReference)

Parameters

TimeReference ITimeReference

Returns

string

SetDayFraction(double)

The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

void SetDayFraction(double dayFraction)

Parameters

dayFraction double

SetFromCurrentLocalTime()

Writes the time to the current date and time on this machine, expressed as the local time.

void SetFromCurrentLocalTime()

SetFromCurrentUtcTime()

Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC).

void SetFromCurrentUtcTime()

SetFromGregorianTime(ref WKSDateTime)

Obtains the time from a given gregorian date and time value.

void SetFromGregorianTime(ref WKSDateTime gregorianTime)

Parameters

gregorianTime WKSDateTime

SetFromIntegerTime(esriIntegerTimeFormat, long)

Writes the time from an integer time.

void SetFromIntegerTime(esriIntegerTimeFormat integerTimeFormat, long integerTime)

Parameters

integerTimeFormat esriIntegerTimeFormat
integerTime long

SetFromObject(object)

Writes the time from a variant object.

void SetFromObject(object Object)

Parameters

Object object

SetFromOleTime(DateTime)

Writes the time from an OLE automation date object.

void SetFromOleTime(DateTime oleTime)

Parameters

oleTime DateTime

SetFromTicks(long)

Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value.

void SetFromTicks(long ticks)

Parameters

ticks long

SetFromTimeString(esriTimeStringFormat, string)

Writes the time from a string, based on the given time string format.

void SetFromTimeString(esriTimeStringFormat timeStringFormat, string timeString)

Parameters

timeStringFormat esriTimeStringFormat
timeString string

SetFromTimeStringCurrentLocale(esriTimeLocaleFormat, string)

Obtains the time from a string, based on the current locale.

void SetFromTimeStringCurrentLocale(esriTimeLocaleFormat timeLocaleFormat, string timeString)

Parameters

timeLocaleFormat esriTimeLocaleFormat
timeString string

SetFromTimeStringCustom(string, int, string, string, string)

Writes the time from a string, based on the given custom time string formats, and locale properties.

void SetFromTimeStringCustom(string timeStringFormat, int LocaleID, string amSymbol, string pmSymbol, string timeString)

Parameters

timeStringFormat string
LocaleID int
amSymbol string
pmSymbol string
timeString string

SetFromXMLTimeString(string)

Writes the time from an XML time string.

int SetFromXMLTimeString(string xmlTimeString)

Parameters

xmlTimeString string

Returns

int

SetJulianDayNumber(int)

The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.

void SetJulianDayNumber(int julianDayNumber)

Parameters

julianDayNumber int

SetNanosecondsSinceMidnight(long)

The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

void SetNanosecondsSinceMidnight(long nanosecondsSinceMidnight)

Parameters

nanosecondsSinceMidnight long

SnapToEndOfMonth()

Adjust the day value, to the last day in the current month and year.

void SnapToEndOfMonth()

SubtractTime(ITime)

Subtracts a given time, and returns the time duration result.

ITimeDuration SubtractTime(ITime Time)

Parameters

Time ITime

Returns

ITimeDuration

ToLocal()

Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time.

void ToLocal()

ToUTC()

Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC).

void ToUTC()