IDateFormat Interface

Provides access to members that format date time.

Members

Name Description
Read/write property Calendar Calendar used for date time formating. If not set, the default calendar for the locale will be used.
Read/write property Format Format used to convert date time to string, i.e., yyyy/MM/dd.
Method FromOADate Convert OADate to date time with the milliseconds preserved. Day of week is an integer between 0 and 6, where 0 indicates Sunday and 6 indicates Saturday.
Read/write property Locale Locale used for date time formating, i.e., en-US, zh-CN, ja-JP. If not set, the user default locale will be used.
Method ToOADate Convert date time to OADate with the milliseconds preserved.

IDateFormat.Calendar Property

Calendar used for date time formating. If not set, the default calendar for the locale will be used.

Public Property Calendar As esriCalendarEnum
public esriCalendarEnum Calendar {get; set;}

IDateFormat.Format Property

Format used to convert date time to string, i.e., yyyy/MM/dd.

Public Property Format As String
public string Format {get; set;}

IDateFormat.FromOADate Method

Convert OADate to date time with the milliseconds preserved. Day of week is an integer between 0 and 6, where 0 indicates Sunday and 6 indicates Saturday.

Public Sub FromOADate ( _
    ByVal oadate As Double, _
    ByRef Year As Integer, _
    ByRef Month As Integer, _
    ByRef Day As Integer, _
    ByRef Hour As Integer, _
    ByRef Minute As Integer, _
    ByRef Second As Integer, _
    ByRef millisecond As Integer, _
    ByRef DayOfWeek As Integer _
)
public void FromOADate (
    double oadate,
    ref int Year,
    ref int Month,
    ref int Day,
    ref int Hour,
    ref int Minute,
    ref int Second,
    ref int millisecond,
    ref int DayOfWeek
);

IDateFormat.Locale Property

Locale used for date time formating, i.e., en-US, zh-CN, ja-JP. If not set, the user default locale will be used.

Public Property Locale As String
public string Locale {get; set;}

IDateFormat.ToOADate Method

Convert date time to OADate with the milliseconds preserved.

Public Function ToOADate ( _
    ByVal Year As Integer, _
    ByVal Month As Integer, _
    ByVal Day As Integer, _
    ByVal Hour As Integer, _
    ByVal Minute As Integer, _
    ByVal Second As Integer, _
    ByVal millisecond As Integer _
) As Double
public double ToOADate (
    int Year,
    int Month,
    int Day,
    int Hour,
    int Minute,
    int Second,
    int millisecond
);

Classes that implement IDateFormat

Classes Description
DateFormat An object for formatting date time.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.