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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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.Booleantrue to use a 24-hour time format; otherwise, false.
hasMinutes
Type: System.Booleantrue 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".