Share via


DateOptions.GetHoursString method

Returns the hour values used to display time values in the specified format.

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

Syntax

'Declaration
Public Function GetHoursString ( _
    hoursMode24 As Boolean, _
    hasMinutes As Boolean _
) As String()
'Usage
Dim instance As DateOptions
Dim hoursMode24 As Boolean
Dim hasMinutes As Boolean
Dim returnValue As String()

returnValue = instance.GetHoursString(hoursMode24, _
    hasMinutes)
public string[] GetHoursString(
    bool hoursMode24,
    bool hasMinutes
)

Parameters

  • hoursMode24
    Type: System.Boolean

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

  • hasMinutes
    Type: System.Boolean

    true to include minutes in the hours string; otherwise, false.

Return value

Type: []
A string array that contains the hour values; for example, "00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23".

See also

Reference

DateOptions class

DateOptions members

Microsoft.SharePoint.Utilities namespace