IDateFormat2 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 IsHighPrecision Sets a value indicating if the date is high precision and should display milliseconds when no format string is provided.
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.
Read/write property TimeOnly Indicates if formatted date time contains time only.
Method TimestampOffsetToString Converts a timestamp with offset to a formatted string.
Method ToOADate Convert date time to OADate with the milliseconds preserved.

IDateFormat2.IsHighPrecision Property

Sets a value indicating if the date is high precision and should display milliseconds when no format string is provided.

Public Property IsHighPrecision As Boolean
public bool IsHighPrecision {get; set;}

IDateFormat2.TimeOnly Property

Indicates if formatted date time contains time only.

Public Property TimeOnly As Boolean
public bool TimeOnly {get; set;}

IDateFormat2.TimestampOffsetToString Method

Converts a timestamp with offset to a formatted string.

Public Function TimestampOffsetToString ( _
    ByVal TimeStamp As Double, _
    ByVal offsetInMinutes As Short _
) As String
public string TimestampOffsetToString (
    double TimeStamp,
    short offsetInMinutes
);

Inherited Interfaces

Interfaces Description
IDateFormat Provides access to members that format date time.

Classes that implement IDateFormat2

Classes Description

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