Version

StringToDate Method

Converts a text date representation into a Date value.
Syntax
'Declaration
 
Public Shared Function StringToDate( _
   ByVal date As String _
) As Date
public static DateTime StringToDate( 
   string date
)

Parameters

date
The text representation of the date.

Return Value

A DateTime value.
Remarks

An empty string is assumed to represent an empty date. An empty date is returned as the smallest possible date (DateTime.MinValue).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also