Spread WPF Documentation
ToDateTime Method


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

Parameters

value
The value to be converted.

Return Value

A System.DateTime indicates the converted result.
Exceptions
ExceptionDescription
System.InvalidCastExceptionCan not convert value to System.DateTime
Remarks
Using to convert 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 . If value is System.String, try parsing with current culture. If value is System.TimeSpan, pass TotalDays of value to
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

CalcConvert Class
CalcConvert Members

 

 


Copyright © GrapeCity, inc. All rights reserved.