Share via


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.Boolean

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

  • startDate
    Type: System.DateTime

    A DateTime value to use as the start time.

  • format
    Type: System.String

    A string that contains the format to use for the time string.

Return value

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

See also

Reference

DateOptions class

DateOptions members

Microsoft.SharePoint.Utilities namespace