DateOptions.GetTimeString method
Returns a string representation of the elapsed time between two specified DateTime values.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function GetTimeString ( _
hoursMode24 As Boolean, _
startDate As DateTime, _
endDate As DateTime, _
format As String _
) As String
'Usage
Dim instance As DateOptions
Dim hoursMode24 As Boolean
Dim startDate As DateTime
Dim endDate As DateTime
Dim format As String
Dim returnValue As String
returnValue = instance.GetTimeString(hoursMode24, _
startDate, endDate, format)
public string GetTimeString(
bool hoursMode24,
DateTime startDate,
DateTime endDate,
string format
)
Parameters
hoursMode24
Type: System.Booleantrue to use a 24-hour time format; otherwise, false.
startDate
Type: System.DateTimeA DateTime value to use as the start time.
endDate
Type: System.DateTimeA DateTime value to use as the end time.
format
Type: System.StringA string that contains the format to use for the time string.
Return value
Type: System.String
A string that contains the time value.