Spread Silverlight Documentation
ToTimeSpan Method


The value to be converted.
Convert value to System.TimeSpan.
Syntax
'Declaration
 
Public Shared Function ToTimeSpan( _
   ByVal value As System.Object _
) As System.TimeSpan
'Usage
 
Dim value As System.Object
Dim value As System.TimeSpan
 
value = CalcConvert.ToTimeSpan(value)
public static System.TimeSpan ToTimeSpan( 
   System.object value
)

Parameters

value
The value to be converted.

Return Value

A System.TimeSpan indicates the converted result.
Exceptions
ExceptionDescription
System.InvalidCastExceptionCan not convert value to System.TimeSpan
Remarks
Using System.TimeSpan.FromDays(System.Double) to convert value to convert, if value is not double, first explicitly convert it then to date time. If value is a null reference (Nothing in Visual Basic), pass 0d to System.TimeSpan.FromDays(System.Double). If value is System.String, try parsing with current culture. If value is System.DateTime, pass OADate of value to System.TimeSpan.FromDays(System.Double).
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

CalcConvert Class
CalcConvert Members

 

 


Copyright © GrapeCity, inc. All rights reserved.