DateOptions.GetTimeStringFromPattern method

Returns a string representation of a specified DateTime value.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function GetTimeStringFromPattern ( _
    dt As DateTime, _
    hoursMode24 As Boolean _
) As String
'Usage
Dim instance As DateOptions
Dim dt As DateTime
Dim hoursMode24 As Boolean
Dim returnValue As String

returnValue = instance.GetTimeStringFromPattern(dt, _
    hoursMode24)
public string GetTimeStringFromPattern(
    DateTime dt,
    bool hoursMode24
)

Parameters

  • hoursMode24
    Type: System.Boolean

    true to use a 24-hour time format; otherwise, false.

Return value

Type: System.String
A string that contains the time value.

See also

Reference

DateOptions class

DateOptions members

Microsoft.SharePoint.Utilities namespace