ArcObjects Library Reference (System)  

ITime.QueryTimeStringCustom Method

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

[Visual Basic .NET]
Public Function QueryTimeStringCustom ( _
    ByVal timeStringFormat As String, _
    ByVal LocaleID As Integer, _
    ByVal amSymbol As String, _
    ByVal pmSymbol As String _
) As String
[C#]
public string QueryTimeStringCustom (
    string timeStringFormat,
    int LocaleID,
    string amSymbol,
    string pmSymbol
);
[C++]
HRESULT QueryTimeStringCustom(
  BSTR timeStringFormat,
  long LocaleID,
  BSTR amSymbol,
  BSTR pmSymbol,
  BSTR* timeString
);
[C++]

Parameters

timeStringFormat [in]   timeStringFormat is a parameter of type BSTR LocaleID [in]   LocaleID is a parameter of type long amSymbol [in]   amSymbol is a parameter of type BSTR pmSymbol [in]   pmSymbol is a parameter of type BSTR timeString [out, retval]   timeString is a parameter of type BSTR

Product Availability

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

Description

This function will provide a time/date string in a format specified by the time format string, date format string, and using the AM/PM designators.  The time format string uses the following symbols:

 

h = hour (12 hour clock)

H = hour (24 hour clock)

m = minute

s = second

t = am/pm designator

hh,mm,ss indicate that there is a leading zero for values less than 10

h,m,s indicate that there is no leading zero

Note that the am/pm designator should not be present when the time is measured using a 24-hour clock

the AM/PM designators will only be used if the time string contains the "t" value

 

The date format string uses the following symbols:

M = month of the year

d = day of the month

y = year

MM and dd indicate that there is a leading zero when the month/day is less than 10

M and d indicate that there is no leading zero

yy indicates a 2 digit year

yyyy indicates a 4 digit year

See Also

ITime Interface